From 5f7d08f1ef1a1f582a243104846b0775714ec066 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Sat, 6 May 2006 14:17:16 +0000 Subject: [PATCH] Fixed Zlib optimizations to be based on DEF_OPT_LVL. --- optimize/opt_config.d/Zlib | 56 +++++++++++++++++++++++++++++++ optimize/opt_config.d/defOpt_fPIC | 23 ------------- optimize/opt_override | 2 +- 3 files changed, 57 insertions(+), 24 deletions(-) create mode 100644 optimize/opt_config.d/Zlib delete mode 100644 optimize/opt_config.d/defOpt_fPIC diff --git a/optimize/opt_config.d/Zlib b/optimize/opt_config.d/Zlib new file mode 100644 index 0000000..7503400 --- /dev/null +++ b/optimize/opt_config.d/Zlib @@ -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 diff --git a/optimize/opt_config.d/defOpt_fPIC b/optimize/opt_config.d/defOpt_fPIC deleted file mode 100644 index 05f874e..0000000 --- a/optimize/opt_config.d/defOpt_fPIC +++ /dev/null @@ -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 diff --git a/optimize/opt_override b/optimize/opt_override index 05f8637..e681aee 100644 --- a/optimize/opt_override +++ b/optimize/opt_override @@ -2,4 +2,4 @@ binutils noOpt gcc noOpt glibc noOpt grub noOpt -zlib defOpt_fPIC +zlib Zlib