diff options
author | Petr Viktorin <encukou@gmail.com> | 2020-10-22 18:11:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-22 18:11:53 +0200 |
commit | c6d7e82d19c091af698d4e4b3623648e259843e3 (patch) | |
tree | 05e9145986006f2fdf28ace6a8b92a656fb77f77 /configure | |
parent | bpo-42086: Document AST operator nodes acts as a singleton (GH-22896) (diff) | |
download | cpython-c6d7e82d19c091af698d4e4b3623648e259843e3.tar.gz cpython-c6d7e82d19c091af698d4e4b3623648e259843e3.tar.bz2 cpython-c6d7e82d19c091af698d4e4b3623648e259843e3.zip |
bpo-38980: Only apply -fno-semantic-interposition if available (GH-22892)
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/configure b/configure index df7118f68d3..29f33b543ec 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 |