summaryrefslogtreecommitdiff
path: root/debian/patches/gcc-auto-build.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/gcc-auto-build.diff')
-rw-r--r--debian/patches/gcc-auto-build.diff15
1 files changed, 15 insertions, 0 deletions
diff --git a/debian/patches/gcc-auto-build.diff b/debian/patches/gcc-auto-build.diff
new file mode 100644
index 0000000..e4619ec
--- /dev/null
+++ b/debian/patches/gcc-auto-build.diff
@@ -0,0 +1,15 @@
+# DP: Fix cross building a native compiler.
+
+Index: b/src/gcc/configure.ac
+===================================================================
+--- a/src/gcc/configure.ac
++++ b/src/gcc/configure.ac
+@@ -1686,7 +1686,7 @@ else
+ # Clearing GMPINC is necessary to prevent host headers being
+ # used by the build compiler. Defining GENERATOR_FILE stops
+ # system.h from including gmp.h.
+- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
++ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
+ CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
+ LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+ GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \