commit:     79519252e88f8ad8c8ddf627ff9a473e99222e7b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 26 14:13:21 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Apr 26 14:13:56 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79519252

sys-devel/gcc: fix 13 cross builds w/ fixincludes

Add workaround for now.

Bug: https://bugs.gentoo.org/905118
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gcc/files/gcc-13-fix-cross-fixincludes.patch      | 19 +++++++++++++++++++
 sys-devel/gcc/gcc-13.1.0-r1.ebuild                    |  1 +
 2 files changed, 20 insertions(+)

diff --git a/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch 
b/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch
new file mode 100644
index 000000000000..e4abe01a0830
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch
@@ -0,0 +1,19 @@
+Revert of 
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=59e4c98173a79fcaa2c33253261409f38856c384
+for now to fix cross fixincludes builds.
+
+https://bugs.gentoo.org/905118
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -532,11 +532,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h
+ # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
+ NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@
+ # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
+-ifeq (@includedir@,$(prefix)/include)
+-  CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+-else
+-  CROSS_SYSTEM_HEADER_DIR = @includedir@
+-endif
++CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+ 
+ # autoconf sets SYSTEM_HEADER_DIR to one of the above.
+ # Purge it of unnecessary internal relative paths

diff --git a/sys-devel/gcc/gcc-13.1.0-r1.ebuild 
b/sys-devel/gcc/gcc-13.1.0-r1.ebuild
index d55926f246f1..195b306ad1d2 100644
--- a/sys-devel/gcc/gcc-13.1.0-r1.ebuild
+++ b/sys-devel/gcc/gcc-13.1.0-r1.ebuild
@@ -57,5 +57,6 @@ src_prepare() {
 
        toolchain_src_prepare
 
+       eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
        eapply_user
 }

Reply via email to