aboutsummaryrefslogtreecommitdiff
path: root/10.4.0
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2022-08-22 02:44:40 +0100
committerSam James <sam@gentoo.org>2022-08-22 02:52:35 +0100
commit600bbd9a730071e98561457276232148804c6042 (patch)
treeabed074bc51d8021be1c8f46bb32898e19534b79 /10.4.0
parent12.2.0: add 75_all_go_posix_shell_arithmetic_nonbash.patch (diff)
downloadgcc-patches-600bbd9a730071e98561457276232148804c6042.tar.gz
gcc-patches-600bbd9a730071e98561457276232148804c6042.tar.bz2
gcc-patches-600bbd9a730071e98561457276232148804c6042.zip
10.4.0: add 76_all_d_compiler_for_build_pie.patch
Bug: https://bugs.gentoo.org/855902 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to '10.4.0')
-rw-r--r--10.4.0/gentoo/76_all_d_compiler_for_build_pie.patch63
-rw-r--r--10.4.0/gentoo/README.history3
2 files changed, 66 insertions, 0 deletions
diff --git a/10.4.0/gentoo/76_all_d_compiler_for_build_pie.patch b/10.4.0/gentoo/76_all_d_compiler_for_build_pie.patch
new file mode 100644
index 0000000..97996ea
--- /dev/null
+++ b/10.4.0/gentoo/76_all_d_compiler_for_build_pie.patch
@@ -0,0 +1,63 @@
+https://bugs.gentoo.org/855902
+https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=d3ae0f515d0c675d42f4f18fc267e8e75f6b6f26
+
+From d3ae0f515d0c675d42f4f18fc267e8e75f6b6f26 Mon Sep 17 00:00:00 2001
+From: Iain Buclaw <ibuclaw@gdcproject.org>
+Date: Sun, 16 Jun 2019 18:12:47 +0200
+Subject: [PATCH] d: Use COMPILER_FOR_BUILD to build all D front-end generator
+ programs
+
+This means the correct config headers are included when building the
+D front-end in a Canadian cross configuration.
+
+gcc/d/ChangeLog:
+
+ * Make-lang.in (DMDGEN_COMPILE): Remove.
+ (d/%.dmdgen.o): Use COMPILER_FOR_BUILD and BUILD_COMPILERFLAGS to
+ build all D generator programs.
+ (D_SYSTEM_H): New macro.
+ (d/idgen.dmdgen.o): Add dependencies to build.
+ (d/impcnvgen.dmdgen.o): Likewise.
+ * d-system.h: Include bconfig.h if GENERATOR_FILE is defined.
+--- a/gcc/d/Make-lang.in
++++ b/gcc/d/Make-lang.in
+@@ -52,7 +52,6 @@ d-warn = $(filter-out -pedantic -Woverloaded-virtual, $(STRICT_WARN))
+ # Also filter out warnings for missing format attributes in the D Frontend.
+ DMD_WARN_CXXFLAGS = $(filter-out -Wmissing-format-attribute, $(WARN_CXXFLAGS))
+ DMD_COMPILE = $(subst $(WARN_CXXFLAGS), $(DMD_WARN_CXXFLAGS), $(COMPILE))
+-DMDGEN_COMPILE = $(subst $(COMPILER), $(COMPILER_FOR_BUILD), $(DMD_COMPILE))
+
+ # D Frontend object files.
+ D_FRONTEND_OBJS = \
+@@ -360,6 +359,15 @@ d/id.h: d/id.c
+ d/impcnvtab.c: d/impcnvgen$(build_exeext)
+ cd d && ./impcnvgen$(build_exeext)
+
++# Compile the generator programs.
+ d/%.dmdgen.o: $(srcdir)/d/dmd/%.c
+- $(DMDGEN_COMPILE) $(D_INCLUDES) $<
+- $(POSTCOMPILE)
++ $(COMPILER_FOR_BUILD) -c $(BUILD_COMPILERFLAGS) $(D_INCLUDES) \
++ $(BUILD_CPPFLAGS) -o $@ $<
++
++# Header dependencies for the generator programs.
++D_SYSTEM_H = d/dmd/root/dsystem.h d/d-system.h
++
++d/idgen.dmdgen.o: d/dmd/idgen.c $(D_SYSTEM_H) $(BCONFIG_H) $(SYSTEM_H)
++
++d/impcnvgen.dmdgen.o: d/dmd/impcnvgen.c d/dmd/mtype.h $(D_SYSTEM_H) \
++ $(BCONFIG_H) $(SYSTEM_H)
+--- a/gcc/d/d-system.h
++++ b/gcc/d/d-system.h
+@@ -19,7 +19,11 @@
+ #ifndef GCC_D_SYSTEM_H
+ #define GCC_D_SYSTEM_H
+
++#ifdef GENERATOR_FILE
++#include "bconfig.h"
++#else
+ #include "config.h"
++#endif
+ #include "system.h"
+
+ /* Used by the dmd front-end to determine if we have POSIX-style IO. */
diff --git a/10.4.0/gentoo/README.history b/10.4.0/gentoo/README.history
index 2def6c1..c4ae3f6 100644
--- a/10.4.0/gentoo/README.history
+++ b/10.4.0/gentoo/README.history
@@ -1,3 +1,6 @@
+4 22 Aug 2022
+ + 76_all_d_compiler_for_build_pie.patch
+
3 22 Aug 2022
+ 75_all_glibc_236.patch