diff --git a/autoconf/Dockerfile b/autoconf/Dockerfile index f758203..83631a8 100644 --- a/autoconf/Dockerfile +++ b/autoconf/Dockerfile @@ -3,6 +3,10 @@ FROM docker.io/library/ubuntu:24.04 ARG AUTOCONF_VERSION="2.71" ARG AUTOCONF_ARCHIVE_VERSION="2023.02.20" ARG AUTOMAKE_VERSION="1.16.5" +# Specific revisions of https://git.savannah.gnu.org/gitweb/?p=config.git +# for config.guess and config.sub. +ARG CONFIG_GUESS_REV="9428e344e65176b03b69e4bf4ed0d0fc51d4c26f" +ARG CONFIG_SUB_REV="948ae97ca5703224bd3eada06b7a69f40dd15a02" LABEL org.opencontainers.image.source="https://github.com/python/cpython-devcontainers" LABEL org.opencontainers.image.base.name="docker.io/library/ubuntu:22.04" @@ -40,6 +44,15 @@ RUN PATCH_VERBOSE=1 curl https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archi && ./configure --prefix=/usr/local \ && make \ && make install +ADD --chmod=755 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=${CONFIG_GUESS_REV} \ + /usr/local/share/autoconf/build-aux/config.guess +ADD --chmod=755 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=${CONFIG_SUB_REV} \ + /usr/local/share/autoconf/build-aux/config.sub +COPY config.sub.patch . +RUN p=$(pwd)/config.sub.patch \ + && cd /usr/local/share/autoconf/build-aux \ + && patch -p1 <$p \ + && rm "$p" # https://stackoverflow.com/questions/8811381/possibly-undefined-macro-ac-msg-error/49103418#49103418 RUN cp /usr/local/share/aclocal/*.m4 /usr/share/aclocal \ diff --git a/autoconf/config.sub.patch b/autoconf/config.sub.patch new file mode 100644 index 0000000..e4761c4 --- /dev/null +++ b/autoconf/config.sub.patch @@ -0,0 +1,42 @@ +From bee7bb3310b356e99e3a0f75f23efbc97f1b0a24 Mon Sep 17 00:00:00 2001 +From: Russell Keith-Magee +Date: Mon, 26 Feb 2024 09:21:10 +0800 +Subject: [PATCH] gh-114099: Add configure and Makefile targets to support iOS + compilation. (GH-115390) + +--- + config.sub | Bin 36846 -> 37009 bytes + +diff --git a/config.sub b/config.sub +index 2c6a07ab3c3..1bb6a05dc11 100755 +--- a/config.sub ++++ b/config.sub +@@ -4,6 +4,7 @@ + + # shellcheck disable=SC2006,SC2268 # see below for rationale + ++# Patched 2024-02-03 to include support for arm64_32 and iOS/tvOS/watchOS simulators + timestamp='2024-01-01' + + # This file is free software; you can redistribute it and/or modify it +@@ -1127,7 +1128,7 @@ case $cpu-$vendor in + xscale-* | xscalee[bl]-*) + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` + ;; +- arm64-* | aarch64le-*) ++ arm64-* | aarch64le-* | arm64_32-*) + cpu=aarch64 + ;; + +@@ -1866,6 +1867,8 @@ case $kernel-$os-$obj in + ;; + *-eabi*- | *-gnueabi*-) + ;; ++ ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) ++ ;; + none--*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an machine code file format +-- +2.47.1 +