This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
MahiroOS-jhalfs/optimize/opt_config.d/defOpt_fPIC
2021-10-31 10:22:30 +01:00

33 lines
959 B
Text

#####
#
# MODE defOpt_fPIC configuration
#
# WARNING: Do not edit this mode unless you know what you are
# doing. It's required to build Zlib.
#
# Usage: - Apply optimization string to each variable
# - "unset" will cause the variable to be not set
# instead of just set to null.
#
# Use this as an example for defOpt_myMode combined modes
#
#####
# Inherit optimizations from DEF_OPT_MODE
source optimize/opt_config.d/${DEF_OPT_MODE}
# Append " -fPIC" to default *C{,XX}FLAGS and retain other defaults
for OPT_VAR in $ACTIVE_OPT_VARS ; do
case $OPT_VAR in
CFLAGS | CXXFLAGS | OTHER_CFLAGS | OTHER_CXXFLAGS)
if [[ "$(eval "echo \$${OPT_VAR}_${DEF_OPT_MODE}")" != "unset" ]] ; then
eval ${OPT_VAR}_defOpt_fPIC=\$${OPT_VAR}_${DEF_OPT_MODE}\" -fPIC\"
else
eval ${OPT_VAR}_defOpt_fPIC="unset"
fi
;;
*)
eval ${OPT_VAR}_defOpt_fPIC=\$${OPT_VAR}_${DEF_OPT_MODE}
;;
esac
done