[Slackbuilds-users] Desmume on 64-bit - optimization flag

Matteo Bernardini matteo.bernardini at gmail.com
Wed Jan 23 06:31:14 UTC 2013


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

SLKCFLAGS=${SLKCFLAGS:--O2}
LIBDIRSUFFIX=""
[ "$ARCH" = "x86_64" ] || [ "$ARCH" = "native" -a "$(uname -m)" = "x86_64"
] \
  && SLKCFLAGS="$SLKCFLAGS -fPIC" ; LIBDIRSUFFIX="64"
[ "$ARCH" = "i486" ] || [ "$ARCH" = "native" ] \
  && SLKCFLAGS="$SLKCFLAGS -march=$ARCH"
[ "$ARCH" = "i686" ] && SLKCFLAGS="$SLKCFLAGS -march=$ARCH -mtune=$ARCH"

Matteo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20130123/0fda35e6/attachment.html>


More information about the SlackBuilds-users mailing list