diff options
author | Fabian Groffen <grobian@gentoo.org> | 2024-09-23 21:16:11 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2024-09-23 21:16:11 +0200 |
commit | b55238cc14fdf9eb9cfbd71e26ec84f855f3a259 (patch) | |
tree | 2d5f99a54c551bb3af6a4e5fe60662c466b6bdb2 | |
parent | eclass/toolchain: sync with gx86 (diff) | |
download | prefix-b55238cc14fdf9eb9cfbd71e26ec84f855f3a259.tar.gz prefix-b55238cc14fdf9eb9cfbd71e26ec84f855f3a259.tar.bz2 prefix-b55238cc14fdf9eb9cfbd71e26ec84f855f3a259.zip |
sys-devel/gcc-14.2.0: fix interoperability with Clang 16's as
Sequoia comes with Clang 16 which requires explicitness for reading from
pipe
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r-- | sys-devel/gcc/files/gcc-14.2.0-darwin-as-dash-pipe.patch | 14 | ||||
-rw-r--r-- | sys-devel/gcc/gcc-14.2.0.ebuild | 5 |
2 files changed, 18 insertions, 1 deletions
diff --git a/sys-devel/gcc/files/gcc-14.2.0-darwin-as-dash-pipe.patch b/sys-devel/gcc/files/gcc-14.2.0-darwin-as-dash-pipe.patch new file mode 100644 index 0000000000..a4d79d1295 --- /dev/null +++ b/sys-devel/gcc/files/gcc-14.2.0-darwin-as-dash-pipe.patch @@ -0,0 +1,14 @@ +Since Sequoia with Clang 16, as needs - when used via pipe input + +--- a/gcc/config/darwin.h ++++ b/gcc/config/darwin.h +@@ -977,6 +977,9 @@ + { "weak_import", 0, 0, true, false, false, false, \ + darwin_handle_weak_import_attribute, NULL } + ++/* Since clang 16 called as 'as', it requires a dash to read pipe */ ++#define AS_NEEDS_DASH_FOR_PIPED_INPUT ++ + /* Make local constant labels linker-visible, so that if one follows a + weak_global constant, ld64 will be able to separate the atoms. */ + #undef ASM_GENERATE_INTERNAL_LABEL diff --git a/sys-devel/gcc/gcc-14.2.0.ebuild b/sys-devel/gcc/gcc-14.2.0.ebuild index 1528d821c9..a6df03929c 100644 --- a/sys-devel/gcc/gcc-14.2.0.ebuild +++ b/sys-devel/gcc/gcc-14.2.0.ebuild @@ -46,6 +46,9 @@ src_prepare() { # apply big arm64-darwin patch first thing use elibc_Darwin && eapply "${DISTDIR}"/${P}-arm64-darwin.patch + # run as with - on pipe (for Clang 16) + eapply "${FILESDIR}"/${PN}-14.2.0-darwin-as-dash-pipe.patch + # make sure 64-bits native targets don't screw up the linker paths eapply "${FILESDIR}"/gcc-12-no-libs-for-startfile.patch @@ -57,7 +60,7 @@ src_prepare() { done toolchain_src_prepare - # + # make it have correct install_names on Darwin eapply -p1 "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch |