summaryrefslogtreecommitdiff
path: root/sofort/ccenv
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-06-13 02:24:55 +0000
committermidipix <writeonce@midipix.org>2021-06-13 02:24:55 +0000
commitf979e6fab0b217f5aeb6481019f0def63f4496ab (patch)
treeccba2945fbd6d7b9ecb7cec89aff18c081cd02fa /sofort/ccenv
parent8a10c0e6b47fd9eb15e18d89a26defb0f019aa4c (diff)
downloadslibtool-f979e6fab0b217f5aeb6481019f0def63f4496ab.tar.bz2
slibtool-f979e6fab0b217f5aeb6481019f0def63f4496ab.tar.xz
build system: ccenv: ccenv_output_defs(): record updated cflags/ldflags.
Diffstat (limited to 'sofort/ccenv')
-rw-r--r--sofort/ccenv/ccenv.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh
index cf45cb2..464b309 100644
--- a/sofort/ccenv/ccenv.sh
+++ b/sofort/ccenv/ccenv.sh
@@ -1,3 +1,4 @@
+
# ccenv.sh: sofort's tool-finding bits,
# invoked from within the project-agnostic configure script.
@@ -24,6 +25,11 @@
# ccenv_cflags: the comprehensive cflags for the host being tested
# ccenv_cchost: the host being tested, as reported by -dumpmachine
+# variables available to cfgdefs.sh and cfgfini.sh:
+# ccenv_host_cflags: expanded cflags, valid for the host compiler
+# ccenv_host_ldflags: expanded ldflags, valid for the host compiler
+# ccenv_native_cflags: expanded cflags, valid for the native compiler
+# ccenv_native_ldflags: expanded ldflags, valid for the native compiler
ccenv_usage()
{
@@ -1489,10 +1495,26 @@ ccenv_output_defs()
unset ccenv_tmp
fi
+
+ if [ "${ccenv_cfgtype}" = 'host' ]; then
+ ccenv_cflags=$(${mb_make} -n -f "$mb_pwd/Makefile.tmp" .cflags-host)
+ ccenv_ldflags=$(${mb_make} -n -f "$mb_pwd/Makefile.tmp" .ldflags-host)
+ else
+ ccenv_cflags=$(${mb_make} -n -f "$mb_pwd/Makefile.tmp" .cflags-native)
+ ccenv_ldflags=$(${mb_make} -n -f "$mb_pwd/Makefile.tmp" .ldflags-native)
+ fi
+
+ ccenv_cflags="${ccenv_cflags#*: }"
+ ccenv_ldflags="${ccenv_ldflags#*: }"
+
+ eval 'ccenv_'${ccenv_cfgtype}'_cflags'=\'$ccenv_cflags\'
+ eval 'ccenv_'${ccenv_cfgtype}'_ldflags'=\'$ccenv_ldflags\'
+
eval 'ccenv_'${ccenv_cfgtype}'_cc'=\'$ccenv_cc\'
eval 'ccenv_'${ccenv_cfgtype}'_cc_environment'=\'$ccenv_cc_environment\'
eval 'ccenv_'${ccenv_cfgtype}'_dumpmachine_switch'=\'$ccenv_dumpmachine_switch\'
eval 'ccenv_'${ccenv_cfgtype}'_pkgconf'=\'$ccenv_pkgconf\'
+
}
ccenv_set_cc_sysroot_vars()