summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2020-12-18 13:46:37 +0100
committerFabian Groffen <grobian@gentoo.org>2020-12-18 13:48:14 +0100
commit47cbf56a1f5867442c9ec17db89c00bab5fefc79 (patch)
treed95ad883ccad5b92d60c5fef2f79621033e6d2a8 /profiles/prefix
parentprofiles: drop Solaris 9, 10, x86 Cygwin profiles (diff)
downloadgentoo-47cbf56a1f5867442c9ec17db89c00bab5fefc79.tar.gz
gentoo-47cbf56a1f5867442c9ec17db89c00bab5fefc79.tar.bz2
gentoo-47cbf56a1f5867442c9ec17db89c00bab5fefc79.zip
profiles/prefix/darwin/macos/11.0/arm64: add workaround for config.sub
amd64-darwin is too new to be an established configuration, so patch in recognition for it Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'profiles/prefix')
-rw-r--r--profiles/prefix/darwin/macos/arch/arm64/profile.bashrc21
1 files changed, 21 insertions, 0 deletions
diff --git a/profiles/prefix/darwin/macos/arch/arm64/profile.bashrc b/profiles/prefix/darwin/macos/arch/arm64/profile.bashrc
new file mode 100644
index 000000000000..821237e65875
--- /dev/null
+++ b/profiles/prefix/darwin/macos/arch/arm64/profile.bashrc
@@ -0,0 +1,21 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pre_src_configure() {
+ # catch when multiple pkgs are in one ebuild
+ cd "${WORKDIR}"
+
+ # macOS Big Sur (11.x, darwin20) supports Apple Silicon (arm64),
+ # which config.sub currently doesn't understand about. It is,
+ # however, Apple who seem to use arm64-apple-darwin20 CHOST
+ # triplets, so patch that for various versions of autoconf
+ # This bit should be kept in sync with fix_config_sub in
+ # bootstrap-prefix.sh
+ if [[ ${CHOST} == arm64-apple-darwin* ]] ; then
+ # Apple Silicon doesn't use aarch64, but arm64
+ find . -name "config.sub" | \
+ xargs sed -i -e 's/ arm\(-\*\)* / arm\1 | arm64\1 /'
+ find . -name "config.sub" | \
+ xargs sed -i -e 's/ aarch64 / aarch64 | arm64 /'
+ fi
+}