654162 build system: cfgtest_{host|native}_section(): properly handle ldflags.

Authored and Committed by midipix 3 years ago
    build system: cfgtest_{host|native}_section(): properly handle ldflags.
    
        
file modified
+6 -0
Makefile.in CHANGED
@@ -149,6 +149,12 @@ install-app-extras:
149
149
.cflags-native:
150
150
@true : $(NATIVE_CFLAGS)
151
151
152
+ .ldflags-host:
153
+ @true : $(LDFLAGS)
154
+
155
+ .ldflags-native:
156
+ @true : $(NATIVE_LDFLAGS)
157
+
152
158
153
159
include ./ccenv/host.mk
154
160
include ./ccenv/native.mk
file modified
+15 -9
sofort/cfgtest/cfgtest.sh CHANGED
@@ -49,14 +49,13 @@ cfgtest_host_section()
49
49
50
50
mb_cfgtest_cflags="${mb_cfgtest_cflags#*: }"
51
51
52
- mb_cfgtest_ldflags="$mb_ldflags_cmdline"
53
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_debug"
54
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_common"
55
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_strict"
56
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_config"
57
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_sysroot"
58
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_path"
52
+ mb_cfgtest_ldflags=$(${mb_make} -n -f "$mb_pwd/Makefile.tmp" \
53
+ OS_DSO_EXRULES=default \
54
+ OS_SONAME=symlink \
55
+ OS_ARCHIVE_EXT='.a' \
56
+ .ldflags-host)
57
+
58
+ mb_cfgtest_ldflags="${mb_cfgtest_ldflags#*: }"
59
- mb_cfgtest_ldflags="$mb_cfgtest_ldflags $mb_ldflags_last"
60
59
}
61
60
62
61
@@ -74,7 +73,14 @@ cfgtest_native_section()
74
73
.cflags-native)
75
74
76
75
mb_cfgtest_cflags="${mb_cfgtest_cflags#*: }"
77
- mb_cfgtest_ldflags="$mb_native_ldflags"
76
+
77
+ mb_cfgtest_ldflags=$(${mb_make} -n -f "$mb_pwd/Makefile.tmp" \
78
+ OS_DSO_EXRULES=default \
79
+ OS_SONAME=symlink \
80
+ OS_ARCHIVE_EXT='.a' \
81
+ .ldflags-native)
82
+
83
+ mb_cfgtest_ldflags="${mb_cfgtest_ldflags#*: }"
78
84
}
79
85
80
86