diff options
author | midipix <writeonce@midipix.org> | 2021-06-12 13:45:53 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-06-12 14:56:00 +0000 |
commit | bab309b5aeda50a9a4ff4165be23b20cf4ffbc34 (patch) | |
tree | c31f014c8bf05eb9edcf06866cbc3f6124781085 /sofort/ccenv | |
parent | 9ffefa50aa8085bd022be4c875d115ed3a1fa8cd (diff) | |
download | sbmake-bab309b5aeda50a9a4ff4165be23b20cf4ffbc34.tar.bz2 sbmake-bab309b5aeda50a9a4ff4165be23b20cf4ffbc34.tar.xz |
build system: ccenv: added and integrated ccenv_set_cc_sysroot_vars().
Diffstat (limited to 'sofort/ccenv')
-rw-r--r-- | sofort/ccenv/ccenv.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh index 99a98ef..cf45cb2 100644 --- a/sofort/ccenv/ccenv.sh +++ b/sofort/ccenv/ccenv.sh @@ -1495,6 +1495,35 @@ ccenv_output_defs() eval 'ccenv_'${ccenv_cfgtype}'_pkgconf'=\'$ccenv_pkgconf\' } +ccenv_set_cc_sysroot_vars() +{ + if [ "$ccenv_cfgtype" = 'native' ] || [ -z "$mb_sysroot" ]; then + return 0 + fi + + cfgtest_host_section + ccenv_switch_var="--sysroot=${mb_sysroot}" + + if cfgtest_compiler_switch_arg "${ccenv_switch_var}"; then + printf '\n# %s sysroot: cflags and ldflags\n' "$ccenv_cfgtype" \ + >> "$ccenv_mk" + + for ccenv_make_var in '_CFLAGS_SYSROOT' '_LDFLAGS_SYSROOT'; do + printf '%-40s= %s\n' "${ccenv_make_var}" "${ccenv_switch_var}" \ + >> "$ccenv_mk" + done + else + printf '\n# %s sysroot: cflags and ldflags %s\n' "$ccenv_cfgtype" \ + '(not supported: see config.log)' \ + >> "$ccenv_mk" + + for ccenv_make_var in '_CFLAGS_SYSROOT' '_LDFLAGS_SYSROOT'; do + printf '%-40s=\n' "${ccenv_make_var}" \ + >> "$ccenv_mk" + done + fi +} + ccenv_set_cc_switch_vars() { printf '\n# %s cflags: supported compiler switches\n' "$ccenv_cfgtype" \ @@ -1707,6 +1736,7 @@ ccenv_set_toolchain_variables() ccenv_output_defs ccenv_clean_up + ccenv_set_cc_sysroot_vars ccenv_set_cc_switch_vars ccenv_set_cc_linker_switch_vars } |