Fixed Zlib optimizations to be based on DEF_OPT_LVL.

This commit is contained in:
Manuel Canales Esparcia 2006-05-06 14:17:16 +00:00
parent 53bc10be29
commit 5f7d08f1ef
3 changed files with 57 additions and 24 deletions

View file

@ -0,0 +1,56 @@
#
#$Id$
#
#####
#
# MODE Zlib configuration
#
# Usage: - Apply optimization string to each variable
# - "unset" will cause the variable to be not set
# instead of just set to null.
#
#####
# Inherit optimizations from DEF_OPT_LVL
source optimize/opt_config.d/$DEF_OPT_LVL
eval CFLAGS_Zlib_base=\$CFLAGS_${DEF_OPT_LVL}
eval CXXFLAGS_Zlib_base=\$CXXFLAGS_${DEF_OPT_LVL}
eval LDFLAGS_Zlib_base=\$LDFLAGS_${DEF_OPT_LVL}
eval OTHER_CFLAGS_Zlib_base=\$CFLAGS_${DEF_OPT_LVL}
eval OTHER_CXXFLAGS_Zlib_base=\$OTHER_CXXFLAGS_${DEF_OPT_LVL}
eval OTHER_LDFLAGS_Zlib_base=\$OTHER_LDFLAGS_${DEF_OPT_LVL}
# Set the actual values for Zlib mode
if [[ "$CFLAGS_Zlib_base" != "unset" ]]; then
CFLAGS_Zlib=$CFLAGS_Zlib_base" -fPIC"
else
CFLAGS_Zlib="unset"
fi
if [[ "$CXXFLAGS_Zlib_base" != "unset" ]]; then
CXXFLAGS_Zlib=$CXXFLAGS_Zlib_base" -fPIC"
else
CXXFLAGS_Zlib="unset"
fi
if [[ "$LDFLAGS_Zlib_base" != "unset" ]]; then
LDFLAGS_Zlib=$LDFLAGS_Zlib_base
else
LDFLAGS_Zlib="unset"
fi
if [[ "$OTHER_CFLAGS_Zlib_base" != "unset" ]]; then
OTHER_CFLAGS_Zlib=$OTHER_CFLAGS_Zlib_base" -fPIC"
else
OTHER_CFLAGS_Zlib="unset"
fi
if [[ "$OTHER_CXXFLAGS_Zlib_base" != "unset" ]]; then
OTHER_CXXFLAGS_Zlib=$OTHER_CXXFLAGS_Zlib_base" -fPIC"
else
OTHER_CXXFLAGS_Zlib="unset"
fi
if [[ "$OTHER_LDFLAGS_Zlib_base" != "unset" ]]; then
OTHER_LDFLAGS_Zlib=$OTHER_LDFLAGS_Zlib_base
else
OTHER_LDFLAGS_Zlib="unset"
fi

View file

@ -1,23 +0,0 @@
#
#$Id$
#
#####
#
# MODE defOpt_fPIC configuration
#
# Usage: - Apply optimization string to each variable
# - "unset" will cause the variable to be not set
# instead of just set to null.
#
#####
# Inherit optimizations from defOpt
source optimize/opt_config.d/defOpt
CFLAGS_defOpt_fPIC=$CFLAGS_defOpt" -fPIC"
CXXFLAGS_defOpt_fPIC=$CFLAGS_defOpt" -fPIC"
LDFLAGS_defOpt_fPIC=$LDFLAGS_defOpt
OTHER_CFLAGS_defOpt_fPIC=$CFLAGS_defOpt" -fPIC"
OTHER_CXXFLAGS_defOpt_fPIC=$CXXFLAGS_defOpt" -fPIC"
OTHER_LDFLAGS_defOpt_fPIC=$LDFLAGS_defOpt

View file

@ -2,4 +2,4 @@ binutils noOpt
gcc noOpt
glibc noOpt
grub noOpt
zlib defOpt_fPIC
zlib Zlib