Skip to content

Commit d6d5f0d

Browse files
committed
gh-57449: Define USE_COMPUTED_GOTOS in configure by default
When the compiler supports computed gotos and no --with(out)-computed-gotos option is given, define USE_COMPUTED_GOTOS to 1 in pyconfig.h so that sysconfig matches what ceval_macros.h already does.
1 parent a46c65c commit d6d5f0d

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:program:`configure` now defines ``USE_COMPUTED_GOTOS`` to ``1`` by default
2+
when the compiler supports computed gotos, so :mod:`sysconfig` no longer
3+
reports it as ``0``.

‎configure‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎configure.ac‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7901,6 +7901,11 @@ LABEL2:
79017901
case "$ac_cv_computed_gotos" in yes*)
79027902
AC_DEFINE([HAVE_COMPUTED_GOTOS], [1],
79037903
[Define if the C compiler supports computed gotos.])
7904+
7905+
if test "${with_computed_gotos+set}" != set; then
7906+
AC_DEFINE([USE_COMPUTED_GOTOS], [1],
7907+
[Define if you want to use computed gotos in ceval.c.])
7908+
fi
79047909
esac
79057910

79067911
# Check for --with-tail-call-interp

0 commit comments

Comments
 (0)