summaryrefslogtreecommitdiffhomepage
path: root/sofort
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-11 19:40:03 +0000
committermidipix <writeonce@midipix.org>2021-04-11 20:56:46 +0000
commit4e30a5d5996d55b4a2aaa9d09ed526bb3d68ff98 (patch)
tree06cf47dbff2ec42ab2af56395c0b9a1c45593f86 /sofort
parente32fa5cc042776a76d8358f8d1f4a8864e6f4a67 (diff)
downloadmmglue-4e30a5d5996d55b4a2aaa9d09ed526bb3d68ff98.tar.bz2
mmglue-4e30a5d5996d55b4a2aaa9d09ed526bb3d68ff98.tar.xz
build system: cfgtest.sh: refactored and enhanced cfgtest_library_presence().
Diffstat (limited to 'sofort')
-rw-r--r--sofort/cfgtest/cfgtest.sh21
1 files changed, 13 insertions, 8 deletions
diff --git a/sofort/cfgtest/cfgtest.sh b/sofort/cfgtest/cfgtest.sh
index 7d18a62..f030cd3 100644
--- a/sofort/cfgtest/cfgtest.sh
+++ b/sofort/cfgtest/cfgtest.sh
@@ -40,6 +40,15 @@ cfgtest_host_section()
mb_cfgtest_cfgtype='host'
mb_cfgtest_cflags=$(make -s -f "$mb_pwd/Makefile.tmp" .cflags-host)
+ 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"
+
cfgtest_comment 'host-specific tests'
}
@@ -49,6 +58,7 @@ cfgtest_native_section()
mb_cfgtest_cc="$mb_native_cc"
mb_cfgtest_cfgtype='native'
mb_cfgtest_cflags=$(make -s -f "$mb_pwd/Makefile.tmp" .cflags-native)
+ mb_cfgtest_ldflags="$mb_native_ldflags"
cfgtest_comment 'native system tests'
}
@@ -490,14 +500,9 @@ cfgtest_library_presence()
printf '\n\n' >&3
- cfgtest_cmd=$(printf '%s -o a.out -xc - %s' \
- "$mb_cfgtest_cc" "$mb_cfgtest_cflags")
-
- if [ "$mb_cfgtest_cfgtype" = 'native' ]; then
- cfgtest_cmd="$cfgtest_cmd ${mb_native_ldflags} $cfgtest_libs"
- else
- cfgtest_cmd="$cfgtest_cmd -L${mb_libdir} $cfgtest_libs"
- fi
+ cfgtest_cmd=$(printf '%s -o a.out -xc - %s %s %s' \
+ "$mb_cfgtest_cc" "$mb_cfgtest_cflags" \
+ "$mb_cfgtest_ldflags" "$cfgtest_libs")
printf '%s' "$cfgtest_code_snippet" \
| $(printf '%s' "$cfgtest_cmd") \