Nimbin[12]?Mirrors & Forks / jhalfs / optimize/opt_config.d/defOpt_fPIC

jhalfs git · trunk

jhalfs LFS build automation (mirror)

lfs mirror bash · first commit 2005-09-11 · last commit 2024-02-13 (2 years ago) · synced 3 days ago · upstream: git.linuxfromscratch.org/jhalfs

Python 78.4% Shell 19.8% Makefile 1.8%
git clone https://git.christianimmanuel.de/mirrors-forks/jhalfs.gitwget https://git.christianimmanuel.de/mirrors-forks/jhalfs/archive/jhalfs.tar.gz
optimize/opt_config.d/defOpt_fPIC 959 B · 33 lines raw
#####
#
# 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