summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-01-06 08:36:11 +0000
committermidipix <writeonce@midipix.org>2020-01-06 08:48:01 +0000
commitb3d6bcc872e17f10b5ec7b4939ed4fc8ac4156d5 (patch)
tree68df0b564533f9b5da9c2ef80b717f9cc7f805f2
parent0bbd23967e72f8b7951caf73f135848e8c8d61d1 (diff)
downloadsltdl-b3d6bcc872e17f10b5ec7b4939ed4fc8ac4156d5.tar.bz2
sltdl-b3d6bcc872e17f10b5ec7b4939ed4fc8ac4156d5.tar.xz
build system: ccenv_common_init(): fully expand all cflags.
-rw-r--r--Makefile.in6
-rw-r--r--sofort/ccenv/ccenv.sh11
2 files changed, 8 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in
index 56b482c..7c9b134 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -93,6 +93,12 @@ DISABLE_STATIC = @disable_static@
USE_CUSTOM_CFGDEFS = @use_custom_cfgdefs@
USE_CUSTOM_USRDEFS = @use_custom_usrdefs@
+.cflags-host:
+ @printf '%s' "$(CFLAGS)"
+
+.cflags-native:
+ @printf '%s' "$(NATIVE_CFLAGS)"
+
.SUFFIXES:
all:
diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh
index 8046209..2f61736 100644
--- a/sofort/ccenv/ccenv.sh
+++ b/sofort/ccenv/ccenv.sh
@@ -1247,14 +1247,7 @@ ccenv_common_init()
if [ $ccenv_cfgtype = 'host' ]; then
ccenv_tflags=
- ccenv_cflags=
-
- ccenv_cflags="$ccenv_cflags $mb_cflags_debug $mb_cflags_config"
- ccenv_cflags="$ccenv_cflags $mb_cflags_sysroot $mb_cflags_common"
- ccenv_cflags="$ccenv_cflags $mb_cflags_cmdline $mb_cflags"
- ccenv_cflags="$ccenv_cflags $mb_cflags_path $mb_cflags_os"
- ccenv_cflags="$ccenv_cflags $mb_cflags_site $mb_cflags_strict"
- ccenv_cflags="$ccenv_cflags $mb_cflags_last $mb_cflags_once"
+ ccenv_cflags=$(make -s -f "$mb_pwd/Makefile.tmp" .cflags-host)
ccenv_cc="$mb_user_cc"
ccenv_cpp="$mb_user_cpp"
@@ -1264,7 +1257,7 @@ ccenv_common_init()
ccenv_pe_image_base="$mb_pe_image_base"
else
ccenv_tflags=
- ccenv_cflags="$mb_native_cflags"
+ ccenv_cflags=$(make -s -f "$mb_pwd/Makefile.tmp" .cflags-native)
ccenv_cc="$mb_native_cc"
ccenv_cpp="$mb_native_cpp"
ccenv_cxx="$mb_native_cxx"