Skip to content

Commit b55238c

Browse files
committed
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 <[email protected]>
1 parent cdc0d0a commit b55238c

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Since Sequoia with Clang 16, as needs - when used via pipe input
2+
3+
--- a/gcc/config/darwin.h
4+
+++ b/gcc/config/darwin.h
5+
@@ -977,6 +977,9 @@
6+
{ "weak_import", 0, 0, true, false, false, false, \
7+
darwin_handle_weak_import_attribute, NULL }
8+
9+
+/* Since clang 16 called as 'as', it requires a dash to read pipe */
10+
+#define AS_NEEDS_DASH_FOR_PIPED_INPUT
11+
+
12+
/* Make local constant labels linker-visible, so that if one follows a
13+
weak_global constant, ld64 will be able to separate the atoms. */
14+
#undef ASM_GENERATE_INTERNAL_LABEL

sys-devel/gcc/gcc-14.2.0.ebuild

+4-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ src_prepare() {
4646
# apply big arm64-darwin patch first thing
4747
use elibc_Darwin && eapply "${DISTDIR}"/${P}-arm64-darwin.patch
4848

49+
# run as with - on pipe (for Clang 16)
50+
eapply "${FILESDIR}"/${PN}-14.2.0-darwin-as-dash-pipe.patch
51+
4952
# make sure 64-bits native targets don't screw up the linker paths
5053
eapply "${FILESDIR}"/gcc-12-no-libs-for-startfile.patch
5154

@@ -57,7 +60,7 @@ src_prepare() {
5760
done
5861

5962
toolchain_src_prepare
60-
#
63+
6164
# make it have correct install_names on Darwin
6265
eapply -p1 "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
6366

0 commit comments

Comments
 (0)