diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-9.3/0019-Ensure-target-gcc-headers-can-be-included.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-9.3/0019-Ensure-target-gcc-headers-can-be-included.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-9.3/0019-Ensure-target-gcc-headers-can-be-included.patch b/meta/recipes-devtools/gcc/gcc-9.3/0019-Ensure-target-gcc-headers-can-be-included.patch new file mode 100644 index 0000000000..e0129d1f96 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-9.3/0019-Ensure-target-gcc-headers-can-be-included.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From 182057b80891edc0e8d46835e2d8bfd28330a55a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 20 Feb 2015 10:25:11 +0000 | ||
4 | Subject: [PATCH 19/39] Ensure target gcc headers can be included | ||
5 | |||
6 | There are a few headers installed as part of the OpenEmbedded | ||
7 | gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe | ||
8 | built for the target architecture, these are within the target | ||
9 | sysroot and not cross/nativesdk; thus they weren't able to be | ||
10 | found by gcc with the existing search paths. Add support for | ||
11 | picking up these headers under the sysroot supplied on the gcc | ||
12 | command line in order to resolve this. | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | gcc/Makefile.in | 2 ++ | ||
20 | gcc/cppdefault.c | 4 ++++ | ||
21 | 2 files changed, 6 insertions(+) | ||
22 | |||
23 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
24 | index 57cf7804f0a..7772342ad5e 100644 | ||
25 | --- a/gcc/Makefile.in | ||
26 | +++ b/gcc/Makefile.in | ||
27 | @@ -618,6 +618,7 @@ libexecdir = @libexecdir@ | ||
28 | |||
29 | # Directory in which the compiler finds libraries etc. | ||
30 | libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) | ||
31 | +libsubdir_target = $(target_noncanonical)/$(version) | ||
32 | # Directory in which the compiler finds executables | ||
33 | libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) | ||
34 | # Directory in which all plugin resources are installed | ||
35 | @@ -2867,6 +2868,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\" | ||
36 | |||
37 | PREPROCESSOR_DEFINES = \ | ||
38 | -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ | ||
39 | + -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \ | ||
40 | -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \ | ||
41 | -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ | ||
42 | -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \ | ||
43 | diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c | ||
44 | index c4796385643..980e2bd47a7 100644 | ||
45 | --- a/gcc/cppdefault.c | ||
46 | +++ b/gcc/cppdefault.c | ||
47 | @@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[] | ||
48 | /* This is the dir for gcc's private headers. */ | ||
49 | { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, | ||
50 | #endif | ||
51 | +#ifdef GCC_INCLUDE_SUBDIR_TARGET | ||
52 | + /* This is the dir for gcc's private headers under the specified sysroot. */ | ||
53 | + { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, | ||
54 | +#endif | ||
55 | #ifdef LOCAL_INCLUDE_DIR | ||
56 | /* /usr/local/include comes before the fixincluded header files. */ | ||
57 | { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, | ||
58 | -- | ||
59 | 2.25.1 | ||
60 | |||