Skip to content

Commit 8abd6ce

Browse files
pythongh-115765: Upgrade to GNU Autoconf 2.72 (python#128411)
1 parent 4ed36d6 commit 8abd6ce

File tree

8 files changed

+4511
-3106
lines changed

8 files changed

+4511
-3106
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
4747
runs-on: ubuntu-24.04
4848
container:
49-
image: ghcr.io/python/autoconf:2024.11.11.11786316759
49+
image: ghcr.io/python/autoconf:2025.01.02.12581854023
5050
timeout-minutes: 60
5151
needs: check_source
5252
if: needs.check_source.outputs.run_tests == 'true'
@@ -63,7 +63,7 @@ jobs:
6363
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
6464
- name: Check Autoconf and aclocal versions
6565
run: |
66-
grep "Generated by GNU Autoconf 2.71" configure
66+
grep "Generated by GNU Autoconf 2.72" configure
6767
grep "aclocal 1.16.5" aclocal.m4
6868
grep -q "runstatedir" configure
6969
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4

Doc/whatsnew/3.14.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1069,6 +1069,9 @@ Changes in the Python API
10691069
Build changes
10701070
=============
10711071

1072+
* GNU Autoconf 2.72 is now required to generate :file:`!configure`.
1073+
(Contributed by Erlend Aasland in :gh:`115765`.)
1074+
10721075
PEP 761: Discontinuation of PGP signatures
10731076
------------------------------------------
10741077

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
GNU Autoconf 2.72 is now required to generate :file:`!configure`.
2+
Patch by Erlend Aasland.

Tools/build/regen-configure.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e -x
55
# The check_autoconf_regen job of .github/workflows/build.yml must kept in
66
# sync with this script. Use the same container image than the job so the job
77
# doesn't need to run autoreconf in a container.
8-
IMAGE="ghcr.io/python/autoconf:2024.11.11.11786316759"
8+
IMAGE="ghcr.io/python/autoconf:2025.01.02.12581854023"
99
AUTORECONF="autoreconf -ivf -Werror"
1010

1111
WORK_DIR="/src"

config.guess

+83-24
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#! /bin/sh
22
# Attempt to guess a canonical system name.
3-
# Copyright 1992-2021 Free Software Foundation, Inc.
3+
# Copyright 1992-2023 Free Software Foundation, Inc.
44

55
# shellcheck disable=SC2006,SC2268 # see below for rationale
66

7-
timestamp='2021-06-03'
7+
timestamp='2023-08-22'
88

99
# This file is free software; you can redistribute it and/or modify it
1010
# under the terms of the GNU General Public License as published by
11-
# the Free Software Foundation; either version 3 of the License, or
11+
# the Free Software Foundation, either version 3 of the License, or
1212
# (at your option) any later version.
1313
#
1414
# This program is distributed in the hope that it will be useful, but
@@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
4747
usage="\
4848
Usage: $0 [OPTION]
4949
50-
Output the configuration name of the system \`$me' is run on.
50+
Output the configuration name of the system '$me' is run on.
5151
5252
Options:
5353
-h, --help print this help, then exit
@@ -60,13 +60,13 @@ version="\
6060
GNU config.guess ($timestamp)
6161
6262
Originally written by Per Bothner.
63-
Copyright 1992-2021 Free Software Foundation, Inc.
63+
Copyright 1992-2023 Free Software Foundation, Inc.
6464
6565
This is free software; see the source for copying conditions. There is NO
6666
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
6767

6868
help="
69-
Try \`$me --help' for more information."
69+
Try '$me --help' for more information."
7070

7171
# Parse command line
7272
while test $# -gt 0 ; do
@@ -102,8 +102,8 @@ GUESS=
102102
# temporary files to be created and, as you can see below, it is a
103103
# headache to deal with in a portable fashion.
104104

105-
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
106-
# use `HOST_CC' if defined, but it is deprecated.
105+
# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
106+
# use 'HOST_CC' if defined, but it is deprecated.
107107

108108
# Portable tmp directory creation inspired by the Autoconf team.
109109

@@ -155,6 +155,9 @@ Linux|GNU|GNU/*)
155155

156156
set_cc_for_build
157157
cat <<-EOF > "$dummy.c"
158+
#if defined(__ANDROID__)
159+
LIBC=android
160+
#else
158161
#include <features.h>
159162
#if defined(__UCLIBC__)
160163
LIBC=uclibc
@@ -169,6 +172,7 @@ Linux|GNU|GNU/*)
169172
LIBC=musl
170173
#endif
171174
#endif
175+
#endif
172176
EOF
173177
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
174178
eval "$cc_set_libc"
@@ -437,7 +441,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
437441
# This test works for both compilers.
438442
if test "$CC_FOR_BUILD" != no_compiler_found; then
439443
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
440-
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
444+
(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
441445
grep IS_64BIT_ARCH >/dev/null
442446
then
443447
SUN_ARCH=x86_64
@@ -459,7 +463,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
459463
UNAME_RELEASE=`uname -v`
460464
;;
461465
esac
462-
# Japanese Language versions have a version number like `4.1.3-JL'.
466+
# Japanese Language versions have a version number like '4.1.3-JL'.
463467
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
464468
GUESS=sparc-sun-sunos$SUN_REL
465469
;;
@@ -904,7 +908,7 @@ EOF
904908
fi
905909
;;
906910
*:FreeBSD:*:*)
907-
UNAME_PROCESSOR=`/usr/bin/uname -p`
911+
UNAME_PROCESSOR=`uname -p`
908912
case $UNAME_PROCESSOR in
909913
amd64)
910914
UNAME_PROCESSOR=x86_64 ;;
@@ -929,6 +933,9 @@ EOF
929933
i*:PW*:*)
930934
GUESS=$UNAME_MACHINE-pc-pw32
931935
;;
936+
*:SerenityOS:*:*)
937+
GUESS=$UNAME_MACHINE-pc-serenity
938+
;;
932939
*:Interix*:*)
933940
case $UNAME_MACHINE in
934941
x86)
@@ -963,11 +970,37 @@ EOF
963970
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
964971
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
965972
;;
973+
x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
974+
GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
975+
;;
976+
*:[Mm]anagarm:*:*)
977+
GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
978+
;;
966979
*:Minix:*:*)
967980
GUESS=$UNAME_MACHINE-unknown-minix
968981
;;
969982
aarch64:Linux:*:*)
970-
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
983+
set_cc_for_build
984+
CPU=$UNAME_MACHINE
985+
LIBCABI=$LIBC
986+
if test "$CC_FOR_BUILD" != no_compiler_found; then
987+
ABI=64
988+
sed 's/^ //' << EOF > "$dummy.c"
989+
#ifdef __ARM_EABI__
990+
#ifdef __ARM_PCS_VFP
991+
ABI=eabihf
992+
#else
993+
ABI=eabi
994+
#endif
995+
#endif
996+
EOF
997+
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
998+
eval "$cc_set_abi"
999+
case $ABI in
1000+
eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
1001+
esac
1002+
fi
1003+
GUESS=$CPU-unknown-linux-$LIBCABI
9711004
;;
9721005
aarch64_be:Linux:*:*)
9731006
UNAME_MACHINE=aarch64_be
@@ -1033,7 +1066,16 @@ EOF
10331066
k1om:Linux:*:*)
10341067
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10351068
;;
1036-
loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
1069+
kvx:Linux:*:*)
1070+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1071+
;;
1072+
kvx:cos:*:*)
1073+
GUESS=$UNAME_MACHINE-unknown-cos
1074+
;;
1075+
kvx:mbr:*:*)
1076+
GUESS=$UNAME_MACHINE-unknown-mbr
1077+
;;
1078+
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
10371079
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10381080
;;
10391081
m32r*:Linux:*:*)
@@ -1148,16 +1190,27 @@ EOF
11481190
;;
11491191
x86_64:Linux:*:*)
11501192
set_cc_for_build
1193+
CPU=$UNAME_MACHINE
11511194
LIBCABI=$LIBC
11521195
if test "$CC_FOR_BUILD" != no_compiler_found; then
1153-
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
1154-
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1155-
grep IS_X32 >/dev/null
1156-
then
1157-
LIBCABI=${LIBC}x32
1158-
fi
1196+
ABI=64
1197+
sed 's/^ //' << EOF > "$dummy.c"
1198+
#ifdef __i386__
1199+
ABI=x86
1200+
#else
1201+
#ifdef __ILP32__
1202+
ABI=x32
1203+
#endif
1204+
#endif
1205+
EOF
1206+
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
1207+
eval "$cc_set_abi"
1208+
case $ABI in
1209+
x86) CPU=i686 ;;
1210+
x32) LIBCABI=${LIBC}x32 ;;
1211+
esac
11591212
fi
1160-
GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
1213+
GUESS=$CPU-pc-linux-$LIBCABI
11611214
;;
11621215
xtensa*:Linux:*:*)
11631216
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
@@ -1177,7 +1230,7 @@ EOF
11771230
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
11781231
;;
11791232
i*86:OS/2:*:*)
1180-
# If we were able to find `uname', then EMX Unix compatibility
1233+
# If we were able to find 'uname', then EMX Unix compatibility
11811234
# is probably installed.
11821235
GUESS=$UNAME_MACHINE-pc-os2-emx
11831236
;;
@@ -1318,7 +1371,7 @@ EOF
13181371
GUESS=ns32k-sni-sysv
13191372
fi
13201373
;;
1321-
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1374+
PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
13221375
# says <Richard.M.Bartel@ccMail.Census.GOV>
13231376
GUESS=i586-unisys-sysv4
13241377
;;
@@ -1364,8 +1417,11 @@ EOF
13641417
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
13651418
GUESS=i586-pc-haiku
13661419
;;
1367-
x86_64:Haiku:*:*)
1368-
GUESS=x86_64-unknown-haiku
1420+
ppc:Haiku:*:*) # Haiku running on Apple PowerPC
1421+
GUESS=powerpc-apple-haiku
1422+
;;
1423+
*:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
1424+
GUESS=$UNAME_MACHINE-unknown-haiku
13691425
;;
13701426
SX-4:SUPER-UX:*:*)
13711427
GUESS=sx4-nec-superux$UNAME_RELEASE
@@ -1522,6 +1578,9 @@ EOF
15221578
i*86:rdos:*:*)
15231579
GUESS=$UNAME_MACHINE-pc-rdos
15241580
;;
1581+
i*86:Fiwix:*:*)
1582+
GUESS=$UNAME_MACHINE-pc-fiwix
1583+
;;
15251584
*:AROS:*:*)
15261585
GUESS=$UNAME_MACHINE-unknown-aros
15271586
;;

0 commit comments

Comments
 (0)