diff options
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.inc | 3 | ||||
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6/cpp-honour-sysroot.patch | 40 |
2 files changed, 42 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc index d40a53412e..020e21b071 100644 --- a/meta/recipes-devtools/gcc/gcc-4.6.inc +++ b/meta/recipes-devtools/gcc/gcc-4.6.inc | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | require gcc-common.inc | 1 | require gcc-common.inc |
| 2 | 2 | ||
| 3 | PR = "r24" | 3 | PR = "r25" |
| 4 | 4 | ||
| 5 | # Third digit in PV should be incremented after a minor release | 5 | # Third digit in PV should be incremented after a minor release |
| 6 | # happens from this branch on gcc e.g. currently its 4.6.0 | 6 | # happens from this branch on gcc e.g. currently its 4.6.0 |
| @@ -73,6 +73,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ | |||
| 73 | file://gcc-arm-set-cost.patch \ | 73 | file://gcc-arm-set-cost.patch \ |
| 74 | file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \ | 74 | file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \ |
| 75 | file://fortran-cross-compile-hack.patch \ | 75 | file://fortran-cross-compile-hack.patch \ |
| 76 | file://cpp-honour-sysroot.patch \ | ||
| 76 | " | 77 | " |
| 77 | 78 | ||
| 78 | SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " | 79 | SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " |
diff --git a/meta/recipes-devtools/gcc/gcc-4.6/cpp-honour-sysroot.patch b/meta/recipes-devtools/gcc/gcc-4.6/cpp-honour-sysroot.patch new file mode 100644 index 0000000000..731067741d --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6/cpp-honour-sysroot.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile | ||
| 2 | preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location | ||
| 3 | rather than the --sysroot option specified on the commandline. If access to that directory is | ||
| 4 | permission denied (unreadable), gcc will error. | ||
| 5 | |||
| 6 | This happens when ccache is in use due to the fact it uses preprocessed source files. | ||
| 7 | |||
| 8 | The 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 | |||
| 13 | Upstream-Status: Pending | ||
| 14 | |||
| 15 | RP 2012/04/13 | ||
| 16 | |||
| 17 | Index: gcc-4_6-branch/gcc/gcc.c | ||
| 18 | =================================================================== | ||
| 19 | --- gcc-4_6-branch.orig/gcc/gcc.c 2012-04-13 12:24:37.939671140 +0000 | ||
| 20 | +++ gcc-4_6-branch/gcc/gcc.c 2012-04-13 12:24:54.439670688 +0000 | ||
| 21 | @@ -953,7 +953,7 @@ | ||
| 22 | %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0}, | ||
| 23 | {".i", "@cpp-output", 0, 0, 0}, | ||
| 24 | {"@cpp-output", | ||
| 25 | - "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, | ||
| 26 | + "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, | ||
| 27 | {".s", "@assembler", 0, 0, 0}, | ||
| 28 | {"@assembler", | ||
| 29 | "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, | ||
| 30 | Index: gcc-4_6-branch/gcc/cp/lang-specs.h | ||
| 31 | =================================================================== | ||
| 32 | --- gcc-4_6-branch.orig/gcc/cp/lang-specs.h 2012-04-13 12:25:01.019670594 +0000 | ||
| 33 | +++ gcc-4_6-branch/gcc/cp/lang-specs.h 2012-04-13 12:25:07.567670180 +0000 | ||
| 34 | @@ -64,5 +64,5 @@ | ||
| 35 | {".ii", "@c++-cpp-output", 0, 0, 0}, | ||
| 36 | {"@c++-cpp-output", | ||
| 37 | "%{!M:%{!MM:%{!E:\ | ||
| 38 | - cc1plus -fpreprocessed %i %(cc1_options) %2\ | ||
| 39 | + cc1plus -fpreprocessed %i %I %(cc1_options) %2\ | ||
| 40 | %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, | ||
