[Slackbuilds-users] Desmume on 64-bit - optimization flag
Matteo Bernardini
matteo.bernardini at gmail.com
Wed Jan 23 07:10:59 UTC 2013
2013/1/23 Matteo Bernardini <matteo.bernardini at gmail.com>
> 2013/1/23 Kyle Guinn <elyk03 at gmail.com>
>
>> SLKCFLAGS="-O2"
>> LIBDIRSUFFIX=""
>> if [ "$ARCH" = "x86_64" -o \( "$ARCH" = "native" -a "$(uname -m)" =
>> "x86_64" \) ]; then
>> SLKCFLAGS="$SLKCFLAGS -fPIC"
>> LIBDIRSUFFIX="64"
>> fi
>> if [ "$ARCH" = "native" ]; then
>> SLKCFLAGS="$SLKCFLAGS -march=native"
>> elif [ "$ARCH" = "i486" ]; then
>> SLKCFLAGS="$SLKCFLAGS -march=i486 -mtune=i686"
>> elif [ "$ARCH" = "i686" ]; then
>> SLKCFLAGS="$SLKCFLAGS -march=i686 -mtune=i686"
>> fi
>>
>
> I played a little with it
>
still playing, this is what I came up with at the end
SLKCFLAGS=${SLKCFLAGS:--O2}
LIBDIRSUFFIX=""
[ "$(uname -m)" = "x86_64" ] && SLKCFLAGS="$SLKCFLAGS -fPIC"
LIBDIRSUFFIX="64"
[ "$ARCH" = "i?86" ] || [ "$ARCH" = "native" ] && SLKCFLAGS="$SLKCFLAGS
-march=$ARCH"
[ "$ARCH" = "i686" ] && SLKCFLAGS="$SLKCFLAGS -mtune=$ARCH"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20130123/0c7b5e91/attachment.html>
More information about the SlackBuilds-users
mailing list