summaryrefslogtreecommitdiff
path: root/sofort
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-02-23 09:54:16 -0500
committermidipix <writeonce@midipix.org>2019-02-23 10:07:45 -0500
commit1c672eb4a177f863cf66460fef3b7fb33695d5ca (patch)
tree02998bd361f7c01a3f2594f964151092edf74419 /sofort
parent5664b7a2fbd4ec6febed75c862841657cbc2f658 (diff)
downloadsbpython3-1c672eb4a177f863cf66460fef3b7fb33695d5ca.tar.bz2
sbpython3-1c672eb4a177f863cf66460fef3b7fb33695d5ca.tar.xz
build system: cfgtest.sh: added cfgtest_code_snippet_asm().
Diffstat (limited to 'sofort')
-rw-r--r--sofort/cfgtest/cfgtest.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/sofort/cfgtest/cfgtest.sh b/sofort/cfgtest/cfgtest.sh
index d1e3b1b..24d311f 100644
--- a/sofort/cfgtest/cfgtest.sh
+++ b/sofort/cfgtest/cfgtest.sh
@@ -277,6 +277,33 @@ cfgtest_code_snippet()
}
+cfgtest_code_snippet_asm()
+{
+ mb_internal_cflags=''
+ mb_internal_test="$@"
+
+ cfgtest_tmp=$(mktemp ./tmp_XXXXXXXXXXXXXXXX)
+ cfgtest_ret=1
+
+ for mb_header in $mb_cfgtest_headers; do
+ mb_internal_cflags="$mb_internal_cflags --include=$mb_header"
+ done
+
+ printf '%s' "$mb_internal_test" \
+ | $mb_cfgtest_cc -c -xc - \
+ -o $cfgtest_tmp \
+ $mb_cfgtest_cflags \
+ $mb_internal_cflags \
+ > /dev/null 2>/dev/null \
+ && cfgtest_ret=0
+
+ rm -f "$cfgtest_tmp"
+ unset cfgtest_tmp
+
+ return $cfgtest_ret
+}
+
+
cfgtest_library_presence()
{
printf 'int main(void){return 0;}' \