* [daisy][PATCH 0/1] Backport of gcc header fix from master/dizzy
@ 2015-05-22 16:02 Paul Eggleton
2015-05-22 16:02 ` [daisy][PATCH 1/1] gcc: ensure target gcc headers can be included Paul Eggleton
2015-06-04 10:58 ` [daisy][PATCH 0/1] Backport of gcc header fix from master/dizzy Paul Eggleton
0 siblings, 2 replies; 3+ messages in thread
From: Paul Eggleton @ 2015-05-22 16:02 UTC (permalink / raw)
To: openembedded-core
I made this backport earlier but missed actually sending it.
The following change since commit 5a577ec878a15f3caaf4893b819825ffb8c81266:
build-appliance-image: Update to daisy head revision (2015-05-13 13:27:45 +0100)
is available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/gcc-omp-fix-daisy
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/gcc-omp-fix-daisy
Paul Eggleton (1):
gcc: ensure target gcc headers can be included
meta/recipes-devtools/gcc/gcc-4.8.inc | 1 +
.../gcc/gcc-4.8/target-gcc-includedir.patch | 81 ++++++++++++++++++++++
2 files changed, 82 insertions(+)
create mode 100644 meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch
--
2.1.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [daisy][PATCH 1/1] gcc: ensure target gcc headers can be included
2015-05-22 16:02 [daisy][PATCH 0/1] Backport of gcc header fix from master/dizzy Paul Eggleton
@ 2015-05-22 16:02 ` Paul Eggleton
2015-06-04 10:58 ` [daisy][PATCH 0/1] Backport of gcc header fix from master/dizzy Paul Eggleton
1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2015-05-22 16:02 UTC (permalink / raw)
To: openembedded-core
There are a few headers installed as part of gcc-runtime (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.
Thanks to Richard Purdie for giving me a number of pointers during
fixing this issue.
Fixes [YOCTO #7141].
(From oe-core master rev: 5c87bb9ac2b35b3f8cf2b7d3e4507e7013115162)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/recipes-devtools/gcc/gcc-4.8.inc | 1 +
.../gcc/gcc-4.8/target-gcc-includedir.patch | 81 ++++++++++++++++++++++
2 files changed, 82 insertions(+)
create mode 100644 meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch
diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
index f7d7bec..87e6908 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
@@ -72,6 +72,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
file://0050-PR-target-58595.patch \
file://0051-fix-unwind-race.patch \
+ file://target-gcc-includedir.patch \
"
SRC_URI[md5sum] = "a3d7d63b9cb6b6ea049469a0c4a43c9d"
SRC_URI[sha256sum] = "09dc2276c73424bbbfda1dbddc62bbbf900c9f185acf7f3e1d773ce2d7e3cdc8"
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch b/meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch
new file mode 100644
index 0000000..f48c66d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch
@@ -0,0 +1,81 @@
+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.
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Pending
+
+--- a/gcc/Makefile.in 2014-12-23 11:57:33.327873331 +0000
++++ b/gcc/Makefile.in 2015-01-21 11:32:35.447305394 +0000
+@@ -587,6 +587,7 @@
+
+ # Directory in which the compiler finds libraries etc.
+ libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version)
++libsubdir_target = gcc/$(target_noncanonical)/$(version)
+ # Directory in which the compiler finds executables
+ libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version)
+ # Directory in which all plugin resources are installed
+@@ -2534,6 +2535,7 @@
+
+ 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) \
+--- a/gcc/cppdefault.c 2015-01-13 17:40:26.131012725 +0000
++++ b/gcc/cppdefault.c 2015-01-21 11:30:08.928426492 +0000
+@@ -59,6 +59,10 @@
+ /* 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 },
+diff --git a/gcc/defaults.h b/gcc/defaults.h
+index f94ae17..d98b40b 100644
+--- a/gcc/defaults.h
++++ b/gcc/defaults.h
+@@ -1390,4 +1390,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+
+ #endif /* GCC_INSN_FLAGS_H */
+
++/* Default prefixes to attach to command names. */
++
++#ifndef STANDARD_STARTFILE_PREFIX_1
++#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
++#endif
++#ifndef STANDARD_STARTFILE_PREFIX_2
++#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
++#endif
++
+ #endif /* ! GCC_DEFAULTS_H */
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 9f0b781..174fca8 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1189,13 +1189,6 @@ static const char *gcc_libexec_prefix;
+
+ /* Default prefixes to attach to command names. */
+
+-#ifndef STANDARD_STARTFILE_PREFIX_1
+-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+-#endif
+-#ifndef STANDARD_STARTFILE_PREFIX_2
+-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
+-#endif
+-
+ #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
+ #undef MD_EXEC_PREFIX
+ #undef MD_STARTFILE_PREFIX
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [daisy][PATCH 0/1] Backport of gcc header fix from master/dizzy
2015-05-22 16:02 [daisy][PATCH 0/1] Backport of gcc header fix from master/dizzy Paul Eggleton
2015-05-22 16:02 ` [daisy][PATCH 1/1] gcc: ensure target gcc headers can be included Paul Eggleton
@ 2015-06-04 10:58 ` Paul Eggleton
1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2015-06-04 10:58 UTC (permalink / raw)
To: Saul Wold; +Cc: openembedded-core
On Friday 22 May 2015 17:02:03 Paul Eggleton wrote:
> I made this backport earlier but missed actually sending it.
>
>
> The following change since commit 5a577ec878a15f3caaf4893b819825ffb8c81266:
>
> build-appliance-image: Update to daisy head revision (2015-05-13 13:27:45
> +0100)
>
> is available in the git repository at:
>
> git://git.openembedded.org/openembedded-core-contrib
> paule/gcc-omp-fix-daisy
> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paul
> e/gcc-omp-fix-daisy
>
> Paul Eggleton (1):
> gcc: ensure target gcc headers can be included
>
> meta/recipes-devtools/gcc/gcc-4.8.inc | 1 +
> .../gcc/gcc-4.8/target-gcc-includedir.patch | 81
> ++++++++++++++++++++++ 2 files changed, 82 insertions(+)
> create mode 100644
> meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch
Now that 1.6.3 is out can we look at merging this?
Thanks,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-04 10:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-22 16:02 [daisy][PATCH 0/1] Backport of gcc header fix from master/dizzy Paul Eggleton
2015-05-22 16:02 ` [daisy][PATCH 1/1] gcc: ensure target gcc headers can be included Paul Eggleton
2015-06-04 10:58 ` [daisy][PATCH 0/1] Backport of gcc header fix from master/dizzy Paul Eggleton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox