summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/gcc-4.8-build-args.patch51
2 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
index a9786da97e..80bd02ccf6 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
@@ -66,6 +66,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
66 file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \ 66 file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
67 file://0035-wcast-qual-PR-55383.patch \ 67 file://0035-wcast-qual-PR-55383.patch \
68 file://gcc-4.8-PR56797.patch \ 68 file://gcc-4.8-PR56797.patch \
69 file://gcc-4.8-build-args.patch \
69 " 70 "
70SRC_URI[md5sum] = "e6040024eb9e761c3bea348d1fa5abb0" 71SRC_URI[md5sum] = "e6040024eb9e761c3bea348d1fa5abb0"
71SRC_URI[sha256sum] = "b037fe5132b71ecad2ea7141ec92292b5d32427bf90fd90cde432b1d5abacc2c" 72SRC_URI[sha256sum] = "b037fe5132b71ecad2ea7141ec92292b5d32427bf90fd90cde432b1d5abacc2c"
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/gcc-4.8-build-args.patch b/meta/recipes-devtools/gcc/gcc-4.8/gcc-4.8-build-args.patch
new file mode 100644
index 0000000000..95f39bb23d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/gcc-4.8-build-args.patch
@@ -0,0 +1,51 @@
1When cross compiling a target gcc, target flags may be used on the host
2
3Configure identifies a number of warning flags (WARN_CFLAGS and
4WARN_CXXFLAGS) from the $CC value. The cross compiler may be different
5from the host compiler and may not support the same set of flags. This
6leads to problems such as:
7
8cc1plus: error: unrecognized command line option "-Wno-narrowing"
9cc1plus: error: unrecognized command line option "-Wno-overlength-strings"
10
11Work around this problem by removing the warning flags from the
12BUILD_*FLAGS values.
13
14Upstream-Status: Pending
15
16Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
17
18diff -ur gcc-4.8.0.orig/gcc/configure.ac gcc-4.8.0/gcc/configure.ac
19--- gcc-4.8.0.orig/gcc/configure.ac 2013-05-29 14:44:24.960853593 -0500
20+++ gcc-4.8.0/gcc/configure.ac 2013-05-31 01:34:09.518775962 -0500
21@@ -1892,8 +1892,8 @@
22 # These are the normal (build=host) settings:
23 CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
24 CXX_FOR_BUILD='$(CXX)' AC_SUBST(CXX_FOR_BUILD)
25-BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
26-BUILD_CXXFLAGS='$(ALL_CXXFLAGS)' AC_SUBST(BUILD_CXXFLAGS)
27+BUILD_CFLAGS='$(ALL_BUILD_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
28+BUILD_CXXFLAGS='$(ALL_BUILD_CXXFLAGS)' AC_SUBST(BUILD_CXXFLAGS)
29 BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
30 STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
31
32diff -ur gcc-4.8.0.orig/gcc/Makefile.in gcc-4.8.0/gcc/Makefile.in
33--- gcc-4.8.0.orig/gcc/Makefile.in 2013-05-29 14:44:24.369853593 -0500
34+++ gcc-4.8.0/gcc/Makefile.in 2013-05-31 01:34:30.360776427 -0500
35@@ -989,10 +989,16 @@
36 ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \
37 $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@
38
39+ALL_BUILD_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \
40+ $(CFLAGS) $(INTERNAL_CFLAGS) @DEFS@
41+
42 # The C++ version.
43 ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \
44 $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) $(WARN_CXXFLAGS) @DEFS@
45
46+ALL_BUILD_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \
47+ $(NOEXCEPTION_FLAGS) @DEFS@
48+
49 # Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro
50 # puts -I options in CPPFLAGS, our include files in the srcdir will always
51 # win against random include files in /usr/include.