<div dir="ltr">2013/1/23 Tim Dickson <span dir="ltr"><<a href="mailto:dickson.tim@googlemail.com" target="_blank">dickson.tim@googlemail.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><div><div class="h5">
<div>On 23/01/2013 07:21, Matteo Bernardini
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>I lied (previous versions are fails)<br>
<br>
SLKCFLAGS=${SLKCFLAGS:--O2}<br>
LIBDIRSUFFIX=""<br>
[ "$(uname -m)" = "x86_64" ] && SLKCFLAGS="$SLKCFLAGS
-fPIC" LIBDIRSUFFIX="64"<br>
[ "$ARCH" = "i486" ] || [ "$ARCH" = "native" ] &&
SLKCFLAGS="$SLKCFLAGS -march=$ARCH"<br>
[ "$ARCH" = "i486" ] || [ "$ARCH" = "i686" ] &&
SLKCFLAGS="$SLKCFLAGS -mtune=i686"<br>
<br>
</div>
</div></div></div><div class="im">
</div></blockquote>
i think you would have difficulties creating 32bit packages from
64bit (multilib) slackware, as uname -m would set libdirsuffix to 64
which is not what you want for 32bit package. you might have to add
a && ![ "$ARCH" = "i486" ] or something similar after the
first part of the test.<span class=""></span><br></div></blockquote><div><br></div><div>thank for spotting it, you mean something like this?<br><br>SLKCFLAGS=${SLKCFLAGS:--O2}<br>
LIBDIRSUFFIX=""<br>
[ "$ARCH" = "x86_64" ] || [ "$ARCH" = "native" ] && [ "$(uname -m)" = "x86_64" ] && SLKCFLAGS="$SLKCFLAGS
-fPIC" LIBDIRSUFFIX="64"<br>
[ "$ARCH" = "i486" ] || [ "$ARCH" = "native" ] &&
SLKCFLAGS="$SLKCFLAGS -march=$ARCH"<br>
[ "$ARCH" = "i486" ] || [ "$ARCH" = "i686" ] &&
SLKCFLAGS="$SLKCFLAGS -mtune=i686"<br><br></div><div>Matteo<br></div></div></div></div>