summaryrefslogtreecommitdiffhomepage
path: root/sofort/ccenv
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-01-01 01:46:21 -0500
committermidipix <writeonce@midipix.org>2019-01-01 01:47:55 -0500
commitf55188260aadbb612c995e6d7df0020fd26b4266 (patch)
treebfece27f7e74c77806c1f754d6958649a6019d38 /sofort/ccenv
parent7fd6d6ce0e8f02b02c3f7a3571d7d6090212b297 (diff)
downloadntapi-f55188260aadbb612c995e6d7df0020fd26b4266.tar.bz2
ntapi-f55188260aadbb612c995e6d7df0020fd26b4266.tar.xz
build system: replace config_support() with ccenv_dso_verify().
Diffstat (limited to 'sofort/ccenv')
-rw-r--r--sofort/ccenv/ccenv.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh
index c786f90..a608675 100644
--- a/sofort/ccenv/ccenv.sh
+++ b/sofort/ccenv/ccenv.sh
@@ -963,6 +963,20 @@ ccenv_output_defs()
fi
}
+ccenv_dso_verify()
+{
+ ccenv_str='int foo(int x){return ++x;}'
+ ccenv_cmd="$ccenv_cc -xc - -shared -o a.out"
+
+ rm -f a.out
+
+ printf '%s' "$ccenv_str" | $ccenv_cmd \
+ > /dev/null 2>/dev/null \
+ || mb_disable_shared=yes
+
+ rm -f a.out
+}
+
ccenv_clean_up()
{
rm -f $ccenv_image
@@ -1042,6 +1056,7 @@ ccenv_set_toolchain_variables()
ccenv_set_host_variables()
{
ccenv_set_toolchain_variables 'host'
+ ccenv_dso_verify
}
ccenv_set_native_variables()