summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-06-09 00:53:10 +0000
committermidipix <writeonce@midipix.org>2021-06-09 01:00:22 +0000
commit90a5a80f0ce5cd24298ecf1f15c56dfd5977846e (patch)
treee25c3dc7f80b7fe585af1003796aa16484ce7806
parent485f08bc23d8acf8ca5f46adad75d59c254ecb72 (diff)
downloadsbmake-90a5a80f0ce5cd24298ecf1f15c56dfd5977846e.tar.bz2
sbmake-90a5a80f0ce5cd24298ecf1f15c56dfd5977846e.tar.xz
build system: cfgtest_{host|native}_section(): properly handle ldflags.
-rw-r--r--Makefile.in6
-rw-r--r--sofort/cfgtest/cfgtest.sh24
2 files changed, 21 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in
index 05015f2..a8c18b1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -149,6 +149,12 @@ install-app-extras:
.cflags-native:
@true : $(NATIVE_CFLAGS)
+.ldflags-host:
+ @true : $(LDFLAGS)
+
+.ldflags-native:
+ @true : $(NATIVE_LDFLAGS)
+
include ./ccenv/host.mk
include ./ccenv/native.mk
diff --git a/sofort/cfgtest/cfgtest.sh b/sofort/cfgtest/cfgtest.sh
index 8d62a08..3a2b0f7 100644
--- a/sofort/cfgtest/cfgtest.sh
+++ b/sofort/cfgtest/cfgtest.sh
@@ -49,14 +49,13 @@ cfgtest_host_section()
mb_cfgtest_cflags="${mb_cfgtest_cflags#*: }"
- mb_cfgtest_ldflags="$mb_ldflags_cmdline"
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_debug"
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_common"
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_strict"
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_config"
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_sysroot"
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_path"
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_last"
+ mb_cfgtest_ldflags=$(${mb_make} -n -f "$mb_pwd/Makefile.tmp" \
+ OS_DSO_EXRULES=default \
+ OS_SONAME=symlink \
+ OS_ARCHIVE_EXT='.a' \
+ .ldflags-host)
+
+ mb_cfgtest_ldflags="${mb_cfgtest_ldflags#*: }"
}
@@ -74,7 +73,14 @@ cfgtest_native_section()
.cflags-native)
mb_cfgtest_cflags="${mb_cfgtest_cflags#*: }"
- mb_cfgtest_ldflags="$mb_native_ldflags"
+
+ mb_cfgtest_ldflags=$(${mb_make} -n -f "$mb_pwd/Makefile.tmp" \
+ OS_DSO_EXRULES=default \
+ OS_SONAME=symlink \
+ OS_ARCHIVE_EXT='.a' \
+ .ldflags-native)
+
+ mb_cfgtest_ldflags="${mb_cfgtest_ldflags#*: }"
}