summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2019-10-15 07:26:12 (GMT)
committerGitHub <noreply@github.com>2019-10-15 07:26:12 (GMT)
commit0b60f64e4343913b4931dc27379d9808e5b78fe1 (patch)
tree197eeeff16c9146b5040bed69d1e0d95c5fdc87b /configure.ac
parent4d202281c128e2026e78fc5f4cc752b1dafbf3ad (diff)
downloadcpython-0b60f64e4343913b4931dc27379d9808e5b78fe1.zip
cpython-0b60f64e4343913b4931dc27379d9808e5b78fe1.tar.gz
cpython-0b60f64e4343913b4931dc27379d9808e5b78fe1.tar.bz2
bpo-11410: Standardize and use symbol visibility attributes across POSIX and Windows. (GH-16347)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 917a908..8de5340 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1787,6 +1787,26 @@ yes)
CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
fi
+ AC_MSG_CHECKING(if we can use visibility in $CC)
+ ac_save_cc="$CC"
+ CC="$CC -fvisibility=hidden"
+ AC_CACHE_VAL(ac_cv_enable_visibility,
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_PROGRAM([[]], [[]])
+ ],[
+ ac_cv_enable_visibility=yes
+ ],[
+ ac_cv_enable_visibility=no
+ ]))
+ CC="$ac_save_cc"
+ AC_MSG_RESULT($ac_cv_enable_visibility)
+
+ if test $ac_cv_enable_visibility = yes
+ then
+ CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
+ fi
+
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
# support. Without this, treatment of subnormals doesn't follow
# the standard.