Skip to content

Commit

Permalink
autoconf: Sync config.guess, config.sub with CPython repo
Browse files Browse the repository at this point in the history
`config.sub.patch` is derived from:
python/cpython@bee7bb3
  • Loading branch information
rhansen committed Dec 4, 2024
1 parent e3aa23c commit 440d33f
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
13 changes: 13 additions & 0 deletions autoconf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 \
Expand Down
42 changes: 42 additions & 0 deletions autoconf/config.sub.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From bee7bb3310b356e99e3a0f75f23efbc97f1b0a24 Mon Sep 17 00:00:00 2001
From: Russell Keith-Magee <[email protected]>
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

0 comments on commit 440d33f

Please sign in to comment.