diff --git a/configure b/configure index 5808e6298efcfd..c0702cf05ec624 100755 --- a/configure +++ b/configure @@ -1122,7 +1122,7 @@ with_platlibdir with_wheel_pkg_dir with_readline with_computed_gotos -with_tail_calling_interp +with_tail_call_interp with_ensurepip with_openssl with_openssl_rpath @@ -1930,7 +1930,7 @@ Optional Packages: use libedit for backend or disable readline module --with-computed-gotos enable computed gotos in evaluation loop (enabled by default on supported compilers) - --tail-calling-interp enable tail-calling interpreter in evaluation loop + --tail-call-interp enable tail-calling interpreter in evaluation loop and rest of CPython (enabled by default on supported compilers) --with-ensurepip[=install|upgrade|no] @@ -29237,14 +29237,14 @@ printf "%s\n" "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h esac -# Check for --with-tail-calling-interp -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tail-calling-interp" >&5 -printf %s "checking for --with-tail-calling-interp... " >&6; } +# Check for --with-tail-call-interp +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tail-call-interp" >&5 +printf %s "checking for --with-tail-call-interp... " >&6; } -# Check whether --with-tail-calling-interp was given. -if test ${with_tail_calling_interp+y} +# Check whether --with-tail-call-interp was given. +if test ${with_tail_call_interp+y} then : - withval=$with_tail_calling_interp; + withval=$with_tail_call_interp; if test "$withval" = yes then @@ -29307,14 +29307,19 @@ esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tail_call" >&5 printf "%s\n" "$ac_cv_tail_call" >&6; } -if $tier2_flags == ""; then +# Do not enable tail-calling interpreter if tier 2 is enabled. +if ${tier2_flags:+false} : +then : + case "$ac_cv_tail_call" in yes*) printf "%s\n" "#define Py_TAIL_CALL_INTERP 1" >>confdefs.h esac + fi + case $ac_sys_system in AIX*) diff --git a/configure.ac b/configure.ac index 4de8d055a55c8a..ca16289f24c01b 100644 --- a/configure.ac +++ b/configure.ac @@ -7004,12 +7004,12 @@ case "$ac_cv_computed_gotos" in yes*) [Define if the C compiler supports computed gotos.]) esac -# Check for --with-tail-calling-interp -AC_MSG_CHECKING([for --with-tail-calling-interp]) +# Check for --with-tail-call-interp +AC_MSG_CHECKING([for --with-tail-call-interp]) AC_ARG_WITH( - [tail-calling-interp], + [tail-call-interp], [AS_HELP_STRING( - [--tail-calling-interp], + [--tail-call-interp], [enable tail-calling interpreter in evaluation loop and rest of CPython (enabled by default on supported compilers)] )], [ @@ -7053,12 +7053,19 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[[ else ac_cv_tail_call=no fi])) -if $tier2_flags == ""; then +# Do not enable tail-calling interpreter if tier 2 is enabled. +AS_VAR_IF( + [tier2_flags], + [], + [ case "$ac_cv_tail_call" in yes*) AC_DEFINE([Py_TAIL_CALL_INTERP], [1], [Define if the C compiler supports efficient proper tail calls.]) - esac -fi + esac + ], + [] +) + case $ac_sys_system in AIX*)