diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-10-14 08:48:57 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-11-05 22:33:22 +0000 |
commit | e2eb8aff27c9912ce01b4938daecd0f94308bf6a (patch) | |
tree | 5694fa20fe4e342706db927beccdf6490d3928ab /meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | |
parent | a3d3d7f511ac836c619236e03c5eea34598e463e (diff) | |
download | poky-e2eb8aff27c9912ce01b4938daecd0f94308bf6a.tar.gz |
gcc6: Upgrade to 6.4
(From OE-Core rev: 7874fa86cb583fe6a178b95ead09430486197197)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch new file mode 100644 index 0000000000..939b0705f8 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 00ef5f0f2a8d3b33aeb1e55c0d23439f4dd495af Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:08:31 +0400 | ||
4 | Subject: [PATCH 12/46] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET | ||
5 | |||
6 | Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it. | ||
7 | |||
8 | This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET. | ||
9 | |||
10 | Other changes I had to do include: | ||
11 | |||
12 | - moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though. | ||
13 | |||
14 | - passing the right CFLAGS to configure scripts as exported environment variables | ||
15 | |||
16 | I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do. | ||
17 | |||
18 | Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3? | ||
19 | |||
20 | Signed-off-by: Paolo Bonzini <bonzini@gnu.org> | ||
21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
22 | |||
23 | Upstream-Status: Pending | ||
24 | --- | ||
25 | configure | 32 ++++++++++++++++++++++++++++++++ | ||
26 | 1 file changed, 32 insertions(+) | ||
27 | |||
28 | diff --git a/configure b/configure | ||
29 | index bfadc33..755d382 100755 | ||
30 | --- a/configure | ||
31 | +++ b/configure | ||
32 | @@ -6819,6 +6819,38 @@ fi | ||
33 | |||
34 | |||
35 | |||
36 | +# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS | ||
37 | +# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS | ||
38 | +# might also be empty (or "-g", if a non-GCC C++ compiler is in the path). | ||
39 | +# We want to ensure that TARGET libraries (which we know are built with | ||
40 | +# gcc) are built with "-O2 -g", so include those options when setting | ||
41 | +# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. | ||
42 | +if test "x$CFLAGS_FOR_TARGET" = x; then | ||
43 | + CFLAGS_FOR_TARGET=$CFLAGS | ||
44 | + case " $CFLAGS " in | ||
45 | + *" -O2 "*) ;; | ||
46 | + *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;; | ||
47 | + esac | ||
48 | + case " $CFLAGS " in | ||
49 | + *" -g "* | *" -g3 "*) ;; | ||
50 | + *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;; | ||
51 | + esac | ||
52 | +fi | ||
53 | + | ||
54 | + | ||
55 | +if test "x$CXXFLAGS_FOR_TARGET" = x; then | ||
56 | + CXXFLAGS_FOR_TARGET=$CXXFLAGS | ||
57 | + case " $CXXFLAGS " in | ||
58 | + *" -O2 "*) ;; | ||
59 | + *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;; | ||
60 | + esac | ||
61 | + case " $CXXFLAGS " in | ||
62 | + *" -g "* | *" -g3 "*) ;; | ||
63 | + *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;; | ||
64 | + esac | ||
65 | +fi | ||
66 | + | ||
67 | + | ||
68 | # Handle --with-headers=XXX. If the value is not "yes", the contents of | ||
69 | # the named directory are copied to $(tooldir)/sys-include. | ||
70 | if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then | ||
71 | -- | ||
72 | 2.8.2 | ||
73 | |||