diff options
author | Petr Viktorin <encukou@gmail.com> | 2020-10-22 16:11:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-22 16:11:53 (GMT) |
commit | c6d7e82d19c091af698d4e4b3623648e259843e3 (patch) | |
tree | 05e9145986006f2fdf28ace6a8b92a656fb77f77 /configure | |
parent | b37c994e5ac73268abe23c52005b80cdca099793 (diff) | |
download | cpython-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-x | configure | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -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 |