summaryrefslogtreecommitdiffstats
path: root/toolchain-layer/recipes-devtools/gcc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-04-19 02:24:10 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-04-19 09:49:25 +0200
commit643a5268eb934fc994a8fa88c181a63f2394eacd (patch)
treebe416031227239ba262d581979d722382c7ad994 /toolchain-layer/recipes-devtools/gcc
parentb519276f3f069447c059cdc2553735ce537fc822 (diff)
downloadmeta-openembedded-643a5268eb934fc994a8fa88c181a63f2394eacd.tar.gz
gcc-4.5: Backport cpp honor sysroot patch
This patch is well vetted on gcc-4.6 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc')
-rw-r--r--toolchain-layer/recipes-devtools/gcc/gcc-4.5.inc3
-rw-r--r--toolchain-layer/recipes-devtools/gcc/gcc-4.5/cpp-honour-sysroot.patch36
2 files changed, 38 insertions, 1 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.5.inc b/toolchain-layer/recipes-devtools/gcc/gcc-4.5.inc
index ee4a43407..8fabf3044 100644
--- a/toolchain-layer/recipes-devtools/gcc/gcc-4.5.inc
+++ b/toolchain-layer/recipes-devtools/gcc/gcc-4.5.inc
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
14 14
15 15
16PV = "4.5" 16PV = "4.5"
17PR = "r48" 17PR = "r49"
18 18
19# BINV should be incremented after updating to a revision 19# BINV should be incremented after updating to a revision
20# after a minor gcc release (e.g. 4.5.1 or 4.5.2) has been made 20# after a minor gcc release (e.g. 4.5.1 or 4.5.2) has been made
@@ -38,6 +38,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
38 file://gcc-armv4-pass-fix-v4bx-to-ld.patch \ 38 file://gcc-armv4-pass-fix-v4bx-to-ld.patch \
39 file://sh4-multilib.patch \ 39 file://sh4-multilib.patch \
40 file://arm-lib1funcs.as-fix-mismatch-between-conditions-of-an-IT-block.patch \ 40 file://arm-lib1funcs.as-fix-mismatch-between-conditions-of-an-IT-block.patch \
41 file://cpp-honour-sysroot.patch \
41 \ 42 \
42 file://linaro/gcc-4.5-linaro-r99297.patch \ 43 file://linaro/gcc-4.5-linaro-r99297.patch \
43 file://linaro/gcc-4.5-linaro-r99298.patch \ 44 file://linaro/gcc-4.5-linaro-r99298.patch \
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.5/cpp-honour-sysroot.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.5/cpp-honour-sysroot.patch
new file mode 100644
index 000000000..cf4c77c26
--- /dev/null
+++ b/toolchain-layer/recipes-devtools/gcc/gcc-4.5/cpp-honour-sysroot.patch
@@ -0,0 +1,36 @@
1Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
2preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
3rather than the --sysroot option specified on the commandline. If access to that directory is
4permission denied (unreadable), gcc will error.
5
6This happens when ccache is in use due to the fact it uses preprocessed source files.
7
8The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
9-isystem, -isysroot happen and the correct sysroot is used.
10
11[YOCTO #2074]
12
13Upstream-Status: Pending
14
15RP 2012/04/13
16
17--- a/gcc/gcc.c
18+++ b/gcc/gcc.c
19@@ -1106,7 +1106,7 @@ static const struct compiler default_com
20 %W{o*:--output-pch=%*}%V}}}}}}", 0, 0, 0},
21 {".i", "@cpp-output", 0, 1, 0},
22 {"@cpp-output",
23- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0},
24+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0},
25 {".s", "@assembler", 0, 1, 0},
26 {"@assembler",
27 "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 1, 0},
28--- a/gcc/cp/lang-specs.h
29+++ b/gcc/cp/lang-specs.h
30@@ -63,5 +63,5 @@ along with GCC; see the file COPYING3.
31 {".ii", "@c++-cpp-output", 0, 0, 0},
32 {"@c++-cpp-output",
33 "%{!M:%{!MM:%{!E:\
34- cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
35+ cc1plus -fpreprocessed %i %I %(cc1_options) %2 %{+e*}\
36 %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},