aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2019-10-15 08:26:12 +0100
committerGitHub <noreply@github.com>2019-10-15 08:26:12 +0100
commit0b60f64e4343913b4931dc27379d9808e5b78fe1 (patch)
tree197eeeff16c9146b5040bed69d1e0d95c5fdc87b /configure.ac
parentbpo-38133: Update docs to reflect fixes to py.exe launcher (GH-16791) (diff)
downloadcpython-0b60f64e4343913b4931dc27379d9808e5b78fe1.tar.gz
cpython-0b60f64e4343913b4931dc27379d9808e5b78fe1.tar.bz2
cpython-0b60f64e4343913b4931dc27379d9808e5b78fe1.zip
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 917a9087185..8de53408eea 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.