diff options
author | 2024-01-18 09:46:08 +0100 | |
---|---|---|
committer | 2024-01-18 09:46:08 +0100 | |
commit | a086b6d31153bbb70f19c18ef599afc6440a6f9d (patch) | |
tree | 132dcfe3eedcad9681a7e6fc89876f3088067e76 /dev-build | |
parent | dev-build/meson: import from gx86 to keep xtools support (diff) | |
download | prefix-a086b6d31153bbb70f19c18ef599afc6440a6f9d.tar.gz prefix-a086b6d31153bbb70f19c18ef599afc6440a6f9d.tar.bz2 prefix-a086b6d31153bbb70f19c18ef599afc6440a6f9d.zip |
dev-build/meson: replace xtools patch with PR #12747
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'dev-build')
-rw-r--r-- | dev-build/meson/files/meson-1.3.1-xtools-support.patch | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/dev-build/meson/files/meson-1.3.1-xtools-support.patch b/dev-build/meson/files/meson-1.3.1-xtools-support.patch index 6e9e670ba8..6d766afc10 100644 --- a/dev-build/meson/files/meson-1.3.1-xtools-support.patch +++ b/dev-build/meson/files/meson-1.3.1-xtools-support.patch @@ -1,26 +1,36 @@ -linkers_detect: detect xtools (Apple ld64 derivative) +From 2725b6d7a35b3bbbadd65c0accd71a66ac70549d Mon Sep 17 00:00:00 2001 +From: Fabian Groffen <grobian@gentoo.org> +Date: Wed, 17 Jan 2024 17:04:45 +0100 +Subject: [PATCH] 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. +xtools is in use on Gentoo Prefix x86_64 and ppc based Darwin 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. +Since xtools is answering with a version to --version, as opposed to +ld64, detection of xtools in the ld64 handling block is not possible, +since --version already succeeded. Author: Fabian Groffen <grobian@gentoo.org> Bug: https://bugs.gentoo.org/868516 +Bug: https://github.com/mesonbuild/meson/issues/10805 +Signed-off-by: Fabian Groffen <grobian@gentoo.org> +--- + mesonbuild/linkers/detect.py | 5 +++++ + 1 file changed, 5 insertions(+) +diff --git a/mesonbuild/linkers/detect.py b/mesonbuild/linkers/detect.py +index 918f2e63426b..1bce413f4f52 100644 --- a/mesonbuild/linkers/detect.py +++ b/mesonbuild/linkers/detect.py -@@ -185,6 +185,11 @@ +@@ -174,6 +174,11 @@ def guess_nix_linker(env: 'Environment', compiler: T.List[str], comp_class: T.Ty 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) ++ # detect xtools first, bug #10805 ++ elif 'xtools-' in o.split('\n', maxsplit=1)[0]: ++ xtools = o.split(' ', maxsplit=1)[0] ++ v = xtools.split('-', maxsplit=2)[1] ++ linker = linkers.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: |