summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-05-17 15:09:13 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-18 23:52:54 +0100
commit3b0603391becabb61d16940971db05cadf7c862e (patch)
treea1f30d652d9b870a42709b65c5f54922087e3c82 /meta/recipes-devtools
parent6938faf9d1709124ee651aa2850b4154bbdad7c3 (diff)
downloadpoky-3b0603391becabb61d16940971db05cadf7c862e.tar.gz
gcc: Add target gcc include search for musl config too
Musl has different search order and therefore injects it via INCLUDE_DEFAULTS and does not use the defaults from gcc/cppdefaults.h, this ensures that same fix is extended to musl configs too where it can search for compiler headers It will fix builds with musl where omp.h is not found because it is in gcc includes path on target ( not cross ) sysroot (From OE-Core rev: 3ff688ca02dcc4c0187d1ddc214ec0c74b4e73f1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/gcc/gcc/0019-Ensure-target-gcc-headers-can-be-included.patch64
1 files changed, 60 insertions, 4 deletions
diff --git a/meta/recipes-devtools/gcc/gcc/0019-Ensure-target-gcc-headers-can-be-included.patch b/meta/recipes-devtools/gcc/gcc/0019-Ensure-target-gcc-headers-can-be-included.patch
index 98472dd2b5..120d5a29b2 100644
--- a/meta/recipes-devtools/gcc/gcc/0019-Ensure-target-gcc-headers-can-be-included.patch
+++ b/meta/recipes-devtools/gcc/gcc/0019-Ensure-target-gcc-headers-can-be-included.patch
@@ -1,4 +1,4 @@
1From 9b4eb0e18a953d79d20c78d3ba741af6d71ab9ca Mon Sep 17 00:00:00 2001 1From 6f410ed8fb7eee11ba7a25634c2257666b98ef52 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 10:25:11 +0000 3Date: Fri, 20 Feb 2015 10:25:11 +0000
4Subject: [PATCH] Ensure target gcc headers can be included 4Subject: [PATCH] Ensure target gcc headers can be included
@@ -11,14 +11,18 @@ found by gcc with the existing search paths. Add support for
11picking up these headers under the sysroot supplied on the gcc 11picking up these headers under the sysroot supplied on the gcc
12command line in order to resolve this. 12command line in order to resolve this.
13 13
14Extend target gcc headers search to musl too
15
14Upstream-Status: Pending 16Upstream-Status: Pending
15 17
16Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> 18Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
17Signed-off-by: Khem Raj <raj.khem@gmail.com> 19Signed-off-by: Khem Raj <raj.khem@gmail.com>
18--- 20---
19 gcc/Makefile.in | 2 ++ 21 gcc/Makefile.in | 2 ++
20 gcc/cppdefault.c | 4 ++++ 22 gcc/config/linux.h | 8 ++++++++
21 2 files changed, 6 insertions(+) 23 gcc/config/rs6000/sysv4.h | 8 ++++++++
24 gcc/cppdefault.c | 4 ++++
25 4 files changed, 22 insertions(+)
22 26
23diff --git a/gcc/Makefile.in b/gcc/Makefile.in 27diff --git a/gcc/Makefile.in b/gcc/Makefile.in
24index 59c45c81393..9b17d120aa1 100644 28index 59c45c81393..9b17d120aa1 100644
@@ -40,6 +44,58 @@ index 59c45c81393..9b17d120aa1 100644
40 -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \ 44 -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
41 -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ 45 -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
42 -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \ 46 -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
47diff --git a/gcc/config/linux.h b/gcc/config/linux.h
48index 87efc5f69fe..b525bcd56b3 100644
49--- a/gcc/config/linux.h
50+++ b/gcc/config/linux.h
51@@ -165,6 +165,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
52 #define INCLUDE_DEFAULTS_MUSL_TOOL
53 #endif
54
55+#ifdef GCC_INCLUDE_SUBDIR_TARGET
56+#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
57+ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0},
58+#else
59+#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET
60+#endif
61+
62 #ifdef NATIVE_SYSTEM_HEADER_DIR
63 #define INCLUDE_DEFAULTS_MUSL_NATIVE \
64 { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
65@@ -191,6 +198,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
66 INCLUDE_DEFAULTS_MUSL_PREFIX \
67 INCLUDE_DEFAULTS_MUSL_CROSS \
68 INCLUDE_DEFAULTS_MUSL_TOOL \
69+ INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
70 INCLUDE_DEFAULTS_MUSL_NATIVE \
71 { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
72 { 0, 0, 0, 0, 0, 0 } \
73diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
74index 510abe169c5..0c2bba5ea32 100644
75--- a/gcc/config/rs6000/sysv4.h
76+++ b/gcc/config/rs6000/sysv4.h
77@@ -995,6 +995,13 @@ ncrtn.o%s"
78 #define INCLUDE_DEFAULTS_MUSL_TOOL
79 #endif
80
81+#ifdef GCC_INCLUDE_SUBDIR_TARGET
82+#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
83+ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0},
84+#else
85+#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET
86+#endif
87+
88 #ifdef NATIVE_SYSTEM_HEADER_DIR
89 #define INCLUDE_DEFAULTS_MUSL_NATIVE \
90 { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
91@@ -1021,6 +1028,7 @@ ncrtn.o%s"
92 INCLUDE_DEFAULTS_MUSL_PREFIX \
93 INCLUDE_DEFAULTS_MUSL_CROSS \
94 INCLUDE_DEFAULTS_MUSL_TOOL \
95+ INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
96 INCLUDE_DEFAULTS_MUSL_NATIVE \
97 { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
98 { 0, 0, 0, 0, 0, 0 } \
43diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c 99diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
44index c503d14fc3f..d54d6ce0076 100644 100index c503d14fc3f..d54d6ce0076 100644
45--- a/gcc/cppdefault.c 101--- a/gcc/cppdefault.c