From 48c04595b0fcf13771df3649356da4165906ab1d Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 1 Jan 2019 01:46:21 -0500 Subject: build system: replace config_support() with ccenv_dso_verify(). --- sofort/ccenv/ccenv.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sofort/ccenv') 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() -- cgit v1.2.3