123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- From 9b4eb0e18a953d79d20c78d3ba741af6d71ab9ca Mon Sep 17 00:00:00 2001
- From: Khem Raj <raj.khem@gmail.com>
- Date: Fri, 20 Feb 2015 10:25:11 +0000
- Subject: [PATCH] Ensure target gcc headers can be included
- There are a few headers installed as part of the OpenEmbedded
- gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
- built for the target architecture, these are within the target
- sysroot and not cross/nativesdk; thus they weren't able to be
- found by gcc with the existing search paths. Add support for
- picking up these headers under the sysroot supplied on the gcc
- command line in order to resolve this.
- Upstream-Status: Pending
- Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
- Signed-off-by: Khem Raj <raj.khem@gmail.com>
- ---
- gcc/Makefile.in | 2 ++
- gcc/cppdefault.c | 4 ++++
- 2 files changed, 6 insertions(+)
- diff --git a/gcc/Makefile.in b/gcc/Makefile.in
- index 59c45c81393..9b17d120aa1 100644
- --- a/gcc/Makefile.in
- +++ b/gcc/Makefile.in
- @@ -630,6 +630,7 @@ libexecdir = @libexecdir@
-
- # Directory in which the compiler finds libraries etc.
- libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
- +libsubdir_target = $(target_noncanonical)/$(version)
- # Directory in which the compiler finds executables
- libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
- # Directory in which all plugin resources are installed
- @@ -3016,6 +3017,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
-
- PREPROCESSOR_DEFINES = \
- -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
- + -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
- -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
- -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
- -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
- diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
- index c503d14fc3f..d54d6ce0076 100644
- --- a/gcc/cppdefault.c
- +++ b/gcc/cppdefault.c
- @@ -64,6 +64,10 @@ const struct default_include cpp_include_defaults[]
- /* This is the dir for gcc's private headers. */
- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
- #endif
- +#ifdef GCC_INCLUDE_SUBDIR_TARGET
- + /* This is the dir for gcc's private headers under the specified sysroot. */
- + { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
- +#endif
- #ifdef LOCAL_INCLUDE_DIR
- /* /usr/local/include comes before the fixincluded header files. */
- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
|