summaryrefslogtreecommitdiff
path: root/legacy/gcc6/gcc-4.8-build-args.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-07-02 18:51:15 -0500
committerZach van Rijn <me@zv.io>2022-10-21 18:34:01 -0500
commit57b3454125ff268fb900c0d60b267535857bcd93 (patch)
treefb977ce1b0bdb0b6cbd6454809a86d1705277c8e /legacy/gcc6/gcc-4.8-build-args.patch
parent04142312762064baaf4765e13b479d9e03cfad47 (diff)
downloadpackages-57b3454125ff268fb900c0d60b267535857bcd93.tar.gz
packages-57b3454125ff268fb900c0d60b267535857bcd93.tar.bz2
packages-57b3454125ff268fb900c0d60b267535857bcd93.tar.xz
packages-57b3454125ff268fb900c0d60b267535857bcd93.zip
legacy/gcc6: add buildable patches
Diffstat (limited to 'legacy/gcc6/gcc-4.8-build-args.patch')
-rw-r--r--legacy/gcc6/gcc-4.8-build-args.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/legacy/gcc6/gcc-4.8-build-args.patch b/legacy/gcc6/gcc-4.8-build-args.patch
new file mode 100644
index 000000000..c27e00961
--- /dev/null
+++ b/legacy/gcc6/gcc-4.8-build-args.patch
@@ -0,0 +1,41 @@
+When cross compiling a target gcc, target flags may be used on the host
+
+Configure identifies a number of warning flags (WARN_CFLAGS and
+WARN_CXXFLAGS) from the $CC value. The cross compiler may be different
+from the host compiler and may not support the same set of flags. This
+leads to problems such as:
+
+cc1plus: error: unrecognized command line option "-Wno-narrowing"
+cc1plus: error: unrecognized command line option "-Wno-overlength-strings"
+
+Work around this problem by removing the warning flags from the
+BUILD_CXXFLAGS value, in a way similar to the BUILD_CFLAGS.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: gcc-4.8.0/gcc/configure
+===================================================================
+--- gcc-4.8.0.orig/gcc/configure
++++ gcc-4.8.0/gcc/configure
+@@ -11720,6 +10581,7 @@ STMP_FIXINC=stmp-fixinc
+ if test x$build != x$host || test "x$coverage_flags" != x
+ then
+ BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
++ BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
+ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
+ fi
+
+Index: gcc-4.8.0/gcc/configure.ac
+===================================================================
+--- gcc-4.8.0.orig/gcc/configure.ac
++++ gcc-4.8.0/gcc/configure.ac
+@@ -1901,6 +1901,7 @@ STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_F
+ if test x$build != x$host || test "x$coverage_flags" != x
+ then
+ BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
++ BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
+ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
+ fi
+