summaryrefslogtreecommitdiffhomepage
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
commitf2ee7e3bd900d972a7fd09e04ffc91f89ce2c7fa (patch)
treebb047b490ece8140231e6b1732fa4fac38095d44
parent54c6c85168785921184b08e90a2c5d747864e30e (diff)
downloadptycon-f2ee7e3bd900d972a7fd09e04ffc91f89ce2c7fa.tar.bz2
ptycon-f2ee7e3bd900d972a7fd09e04ffc91f89ce2c7fa.tar.xz
build system: replace config_support() with ccenv_dso_verify().
-rwxr-xr-xconfigure22
-rw-r--r--sofort/ccenv/ccenv.sh15
2 files changed, 15 insertions, 22 deletions
diff --git a/configure b/configure
index 95e1ba9..303721a 100755
--- a/configure
+++ b/configure
@@ -460,27 +460,6 @@ config_cfghost()
}
-config_support()
-{
- [ _$mb_disable_shared = _yes ] && return 0
-
- mbt_cc=$(make .display-cc)
- mbt_cflags=$(make .display-cflags)
- mbt_source='int foo(int x){return ++x;}'
- mbt_result=no
-
- rm -f a.out
- printf '%s' "$mbt_source" | $mbt_cc -shared -o a.out -xc -
- [ -f a.out ] && mbt_result=yes
- rm -f a.out
-
- if [ $mbt_result = no ]; then
- mb_disable_shared=yes
- config_copy
- fi
-}
-
-
config_host()
{
make -s host.tag && return 0
@@ -787,7 +766,6 @@ config_copy
config_ccenv
config_custom
config_cfghost
-config_support
config_host
config_status
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()