summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2020-10-22 16:11:53 (GMT)
committerGitHub <noreply@github.com>2020-10-22 16:11:53 (GMT)
commitc6d7e82d19c091af698d4e4b3623648e259843e3 (patch)
tree05e9145986006f2fdf28ace6a8b92a656fb77f77 /configure
parentb37c994e5ac73268abe23c52005b80cdca099793 (diff)
downloadcpython-c6d7e82d19c091af698d4e4b3623648e259843e3.zip
cpython-c6d7e82d19c091af698d4e4b3623648e259843e3.tar.gz
cpython-c6d7e82d19c091af698d4e4b3623648e259843e3.tar.bz2
bpo-38980: Only apply -fno-semantic-interposition if available (GH-22892)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure36
1 files changed, 36 insertions, 0 deletions
diff --git a/configure b/configure
index df7118f..29f33b5 100755
--- a/configure
+++ b/configure
@@ -6484,8 +6484,44 @@ if test "$Py_OPT" = 'true' ; then
DEF_MAKE_RULE="build_all"
case $CC in
*gcc*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
+$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
+if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$CFLAGS
+ CFLAGS="$CFLAGS -fno-semantic-interposition"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ax_cv_check_cflags___fno_semantic_interposition=yes
+else
+ ax_cv_check_cflags___fno_semantic_interposition=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$ax_check_save_flags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
+$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
+if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then :
+
CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
+
+else
+ :
+fi
+
;;
esac