summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2024-01-13 17:23:49 +0100
committerFabian Groffen <grobian@gentoo.org>2024-01-13 17:24:23 +0100
commitb7035fb0da8ffcf1577b68d43f49511adee8237d (patch)
treee1bc9ab55dbdb854b589ba92b82284e420ed80f2 /dev-util/meson
parentsys-kernel/installkernel: move install.conf from etc to usr/lib (diff)
downloadgentoo-b7035fb0da8ffcf1577b68d43f49511adee8237d.tar.gz
gentoo-b7035fb0da8ffcf1577b68d43f49511adee8237d.tar.bz2
gentoo-b7035fb0da8ffcf1577b68d43f49511adee8237d.zip
dev-util/meson-1.3.1: fix for Darwin with native linker again
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'dev-util/meson')
-rw-r--r--dev-util/meson/files/meson-1.3.1-xtools-support.patch26
-rw-r--r--dev-util/meson/meson-1.3.1.ebuild1
2 files changed, 27 insertions, 0 deletions
diff --git a/dev-util/meson/files/meson-1.3.1-xtools-support.patch b/dev-util/meson/files/meson-1.3.1-xtools-support.patch
new file mode 100644
index 000000000000..6e9e670ba8da
--- /dev/null
+++ b/dev-util/meson/files/meson-1.3.1-xtools-support.patch
@@ -0,0 +1,26 @@
+linkers_detect: detect xtools (Apple ld64 derivative)
+
+xtools is in use on x86_64 and ppc based darwin Prefix installs. Pick
+it up as a valid linker.
+
+Meson is the only thing known at this point to try and figure out what
+linker is in use exactly, so instead of changing the linker (xtools),
+just teach Meson about xtools.
+
+Author: Fabian Groffen <grobian@gentoo.org>
+Bug: https://bugs.gentoo.org/868516
+
+--- a/mesonbuild/linkers/detect.py
++++ b/mesonbuild/linkers/detect.py
+@@ -185,6 +185,11 @@
+ v = search_version(o)
+
+ linker = linkers.LLVMDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v)
++ # detect xtools first, bug #868516
++ elif 'xtools-' in o.split('\n')[0]:
++ xtools = o.split(' ')[0]
++ v = xtools.split('-')[1]
++ linker = AppleDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v)
+ # First might be apple clang, second is for real gcc, the third is icc.
+ # Note that "ld: unknown option: " sometimes instead is "ld: unknown options:".
+ elif e.endswith('(use -v to see invocation)\n') or 'macosx_version' in e or 'ld: unknown option' in e:
diff --git a/dev-util/meson/meson-1.3.1.ebuild b/dev-util/meson/meson-1.3.1.ebuild
index 2498ea56a83a..0f026f75c31e 100644
--- a/dev-util/meson/meson-1.3.1.ebuild
+++ b/dev-util/meson/meson-1.3.1.ebuild
@@ -54,6 +54,7 @@ RDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-1.2.1-python-path.patch
+ "${FILESDIR}"/${PN}-1.3.1-xtools-support.patch
# backport fix for hiding compiler warnings (such as Modern C) in vala and cython
"${FILESDIR}"/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch