look at the build scripts
normaly you have something like this
Code:
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
and later
Code:
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
... whatever
so you may prefer sed cause as you see it is possible that there will be default values if ARCH is unknown and than you have no chance to overwrite/set your own (SLKC/C/CXX)FLAGS
this is somehow a bug in my opinion,
better would be for example
SLKCFLAGS=${SLKCFLAGS:-"-O2 -march=i486 -mtune=i686"}
but I never cared about that cause for these binaries where my own flags are important I have my own buildscripts anyway
and it is the way how slackbuilds are written, so I think this will never change, but since they are all equal, sed -i is your friend