OPTIMIZE_4_SIZE=YES
gives you -Os
OPTIMIZE_4_SPEED=YES
gives you -03
(the default gives you -O2)
I know it a little confusing, but the final options are composed from several elements, each of which can be set individually.
STD_FLAGS="$(echo $OPTIM_FLAGS $MACHINE $EXTRA_FLAGS $TUNE_FLAGS )"
MACHINE is normally '-m32' unless the system is 64-bit.
TUNE_FLAGS is composed from MARCH_FLAGS and ARCH_FLAGS
You can see the code where this is happening in /usr/libexec/src2pkg/01-pre_process. The settings then get used in /usr/libexec/src2pkg/06-configure_source. (Search for STD_FLAGS)
You might want to set the follwoing values in src2pkg.conf file:
Code: Select all
[[ $EXTRA_FLAGS ]] || EXTRA_FLAGS="-pipe -fomit-frame-pointer -fno-strict-aliasing -Wno-shadow -Wno-unused"
[[ $EXTRA_LDFLAGS ]] || EXTRA_LDFLAGS="--relax,--sort-common,--no-keep-memory"
[[ $EXTRA_FLAGS ]] || EXTRA_FLAGS=
instead of simply:
EXTRA_FLAGS=
allows you to override these settings on a per-package basis, so I recommend always using such syntax in the conf file.