Browse Source

Merge pull request #184 from jasmin-j/add_gcc_env_array

Add additional environment variables for gcc build.
1.22
Bryan Hundven 7 years ago
parent
commit
9e9b9bd195
  1. 10
      config/cc/gcc.in.2
  2. 9
      scripts/build/cc/100-gcc.sh

10
config/cc/gcc.in.2

@ -37,6 +37,16 @@ config CC_GCC_EXTRA_CONFIG_ARRAY
if they are properly quoted (or escaped, but prefer quotes). Eg.:
--with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
config CC_GCC_EXTRA_ENV_ARRAY
string
prompt "Extra env variables to set for make"
default ""
help
Used to add specific env variables on the make command line for the
gcc build (eg. INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0')
Leave blank if you don't know better.
config STATIC_TOOLCHAIN
select CC_GCC_STATIC_LIBSTDCXX if CC_GCC_4_4_or_later

9
scripts/build/cc/100-gcc.sh

@ -194,6 +194,7 @@ do_gcc_core_backend() {
local -a core_LDFLAGS
local -a core_targets
local -a extra_user_config
local -a extra_user_env
local arg
for arg in "$@"; do
@ -391,6 +392,10 @@ do_gcc_core_backend() {
extra_config+=("--disable-multilib")
fi
if [ "x${CT_CC_GCC_EXTRA_ENV_ARRAY}" != "x" ]; then
extra_user_env=( "${CT_CC_GCC_EXTRA_ENV_ARRAY[@]}" )
fi
CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
# Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
@ -470,7 +475,7 @@ do_gcc_core_backend() {
repair_cc=""
fi
CT_DoExecLog ALL make ${JOBSFLAGS} -C gcc ${libgcc_rule} \
CT_DoExecLog ALL make ${JOBSFLAGS} ${extra_user_env} -C gcc ${libgcc_rule} \
${repair_cc}
sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule}
else # build_libgcc
@ -489,7 +494,7 @@ do_gcc_core_backend() {
fi
CT_DoLog EXTRA "Building gcc"
CT_DoExecLog ALL make ${JOBSFLAGS} "${core_targets[@]/#/all-}"
CT_DoExecLog ALL make ${JOBSFLAGS} ${extra_user_env} "${core_targets[@]/#/all-}"
CT_DoLog EXTRA "Installing gcc"
CT_DoExecLog ALL make ${JOBSFLAGS} "${core_targets[@]/#/install-}"

Loading…
Cancel
Save