diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-04-14 18:10:45 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-14 10:23:27 +0100 |
commit | 70f1fd06439fc0d340639cfe1e90ba8f4d9298fa (patch) | |
tree | ca86b04f28a6703d0c170e0223f551678b45cb71 /meta/recipes-devtools/gcc/gcc-7.1/0030-Ensure-target-gcc-headers-can-be-included.patch | |
parent | 89c12fc8de6b80e0e9add7f012553eb4e38dac7f (diff) | |
download | poky-70f1fd06439fc0d340639cfe1e90ba8f4d9298fa.tar.gz |
gcc: Add recipes for gcc-7
Switch default compiler to gcc 7
(From OE-Core rev: 03bb12008891cf1a023aaddb6547da6d41d0cab0)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-7.1/0030-Ensure-target-gcc-headers-can-be-included.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-7.1/0030-Ensure-target-gcc-headers-can-be-included.patch | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-7.1/0030-Ensure-target-gcc-headers-can-be-included.patch b/meta/recipes-devtools/gcc/gcc-7.1/0030-Ensure-target-gcc-headers-can-be-included.patch new file mode 100644 index 0000000000..568ba95ea6 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-7.1/0030-Ensure-target-gcc-headers-can-be-included.patch | |||
@@ -0,0 +1,98 @@ | |||
1 | From bf5836989e0ffc1c1df1369df06877e96c08df41 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 30/47] 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 | gcc/defaults.h | 9 +++++++++ | ||
22 | gcc/gcc.c | 7 ------- | ||
23 | 4 files changed, 15 insertions(+), 7 deletions(-) | ||
24 | |||
25 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
26 | index 23cca7f0d5a..95d21effad3 100644 | ||
27 | --- a/gcc/Makefile.in | ||
28 | +++ b/gcc/Makefile.in | ||
29 | @@ -608,6 +608,7 @@ libexecdir = @libexecdir@ | ||
30 | |||
31 | # Directory in which the compiler finds libraries etc. | ||
32 | libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) | ||
33 | +libsubdir_target = gcc/$(target_noncanonical)/$(version) | ||
34 | # Directory in which the compiler finds executables | ||
35 | libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) | ||
36 | # Directory in which all plugin resources are installed | ||
37 | @@ -2791,6 +2792,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\" | ||
38 | |||
39 | PREPROCESSOR_DEFINES = \ | ||
40 | -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ | ||
41 | + -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \ | ||
42 | -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \ | ||
43 | -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ | ||
44 | -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \ | ||
45 | diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c | ||
46 | index 10b96eca0a7..c8da0884872 100644 | ||
47 | --- a/gcc/cppdefault.c | ||
48 | +++ b/gcc/cppdefault.c | ||
49 | @@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[] | ||
50 | /* This is the dir for gcc's private headers. */ | ||
51 | { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, | ||
52 | #endif | ||
53 | +#ifdef GCC_INCLUDE_SUBDIR_TARGET | ||
54 | + /* This is the dir for gcc's private headers under the specified sysroot. */ | ||
55 | + { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, | ||
56 | +#endif | ||
57 | #ifdef LOCAL_INCLUDE_DIR | ||
58 | /* /usr/local/include comes before the fixincluded header files. */ | ||
59 | { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, | ||
60 | diff --git a/gcc/defaults.h b/gcc/defaults.h | ||
61 | index 7ad92d920f8..39848cc9c0e 100644 | ||
62 | --- a/gcc/defaults.h | ||
63 | +++ b/gcc/defaults.h | ||
64 | @@ -1475,4 +1475,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
65 | #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB | ||
66 | #endif | ||
67 | |||
68 | +/* Default prefixes to attach to command names. */ | ||
69 | + | ||
70 | +#ifndef STANDARD_STARTFILE_PREFIX_1 | ||
71 | +#define STANDARD_STARTFILE_PREFIX_1 "/lib/" | ||
72 | +#endif | ||
73 | +#ifndef STANDARD_STARTFILE_PREFIX_2 | ||
74 | +#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" | ||
75 | +#endif | ||
76 | + | ||
77 | #endif /* ! GCC_DEFAULTS_H */ | ||
78 | diff --git a/gcc/gcc.c b/gcc/gcc.c | ||
79 | index c73d4023987..b27245dbf77 100644 | ||
80 | --- a/gcc/gcc.c | ||
81 | +++ b/gcc/gcc.c | ||
82 | @@ -1472,13 +1472,6 @@ static const char *gcc_libexec_prefix; | ||
83 | |||
84 | /* Default prefixes to attach to command names. */ | ||
85 | |||
86 | -#ifndef STANDARD_STARTFILE_PREFIX_1 | ||
87 | -#define STANDARD_STARTFILE_PREFIX_1 "/lib/" | ||
88 | -#endif | ||
89 | -#ifndef STANDARD_STARTFILE_PREFIX_2 | ||
90 | -#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" | ||
91 | -#endif | ||
92 | - | ||
93 | #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */ | ||
94 | #undef MD_EXEC_PREFIX | ||
95 | #undef MD_STARTFILE_PREFIX | ||
96 | -- | ||
97 | 2.12.2 | ||
98 | |||