summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.5.1
diff options
context:
space:
mode:
authorKevin Tian <kevin.tian@intel.com>2010-12-30 12:36:50 +0800
committerSaul Wold <sgw@linux.intel.com>2011-01-02 01:25:40 -0800
commitf13cb20ed19c41b9ff85ef1c9ec0883a21d1d5bf (patch)
tree72357a65b1f773db850cd1f47e049996d35b5744 /meta/recipes-devtools/gcc/gcc-4.5.1
parent2e3cdcb067f9c90f18a2b27d99caa63aa23c488f (diff)
downloadpoky-f13cb20ed19c41b9ff85ef1c9ec0883a21d1d5bf.tar.gz
gcc-4.5.1: make c++ include path relative to "--sysroot"
So far c++ include path is not relative to "--sysroot", which brings trouble if we want to use the toolchain in a new environment where the original build directory generating that toolchain is not available. It's firstly exposed in multiple SDK sysroots support, and then in the case when sstate packages are used, where c++ standard headers are missing because gcc tries to search original build dir. This patch makes c++ include path now relative to "--sysroot", and then once "--sysroot" is assigned correctly in new environment, c++ include paths can be searched as expected. Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.5.1')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.1/GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch
new file mode 100644
index 0000000000..9ae01c3fc7
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1/GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch
@@ -0,0 +1,33 @@
1# by default c++ include directories are not relative to "--sysroot"
2# which brings one trouble when using the toolchain in an environment
3# where the build directory generating that toolchain doesn't exist,
4# e.g. in sstate, machine specific sysroot and relocatable SDK
5# toolchain. This patch now enables c++ include paths under sysroot.
6# This way it's enough as long as "--sysroot" is correctly enabled
7# in the new environment.
8#
9# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-12-30
10
11diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
12index 5024f48..9b47d1c 100644
13--- a/gcc/cppdefault.c
14+++ b/gcc/cppdefault.c
15@@ -48,15 +48,15 @@ const struct default_include cpp_include_defaults[]
16 = {
17 #ifdef GPLUSPLUS_INCLUDE_DIR
18 /* Pick up GNU C++ generic include files. */
19- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 },
20+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 1, 0 },
21 #endif
22 #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
23 /* Pick up GNU C++ target-dependent include files. */
24- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0, 1 },
25+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 1, 1 },
26 #endif
27 #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
28 /* Pick up GNU C++ backward and deprecated include files. */
29- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 },
30+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 1, 0 },
31 #endif
32 #ifdef LOCAL_INCLUDE_DIR
33 /* /usr/local/include comes before the fixincluded header files. */