diff options
author | Andrei Gherzan <andrei.gherzan@huawei.com> | 2022-01-06 15:19:31 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-07 14:39:17 +0000 |
commit | eb5f3fb2f8a657cb9f54e291102ea3b1502bef20 (patch) | |
tree | 4d82b893e833f7765cbf6eb0043ed8dc37395905 /meta/recipes-devtools/gcc | |
parent | a8cd929d3f4064ea7617363b25adf34881a985ae (diff) | |
download | poky-eb5f3fb2f8a657cb9f54e291102ea3b1502bef20.tar.gz |
gcc: Fix compile of gcc plugins
Without this, compiling gcc plugins will fail with an error similar to:
[...]
fatal error: ./config/i386/linux64.h: No such file or directory
[...]
In Yocto, we set up compiling gcc-cross out of tree. Which in turn makes
the generated headers end up in B. The tm.h header will include
generated headers that are expected in plugin/include/config/*.
For example, the linux64.h header, when generating gcc-cross for x86-64,
will end up in tm.h header as:
include "./config/i386/linux64.h"
On the other hand, the make rule `install-plugin` in gcc/Makefile.in
will install the linux64.h assuming that it is generated in the sources
directory and because this is not the case in our setup, the Makefile
ends up installing it in plugin_includedir/`basename $$path` which ends
up installing the header in [..]plugin/include as opposed to
[..]plugin/include/config/i386 (as expected by the generator of tm.h).
The included patch modifies the Makefile rule to match the assumption of
gcc-cross being compiled out of tree.
(From OE-Core rev: 92167f8e02bb6fbbe1ee6a6678525a0ae27b00a5)
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-11.2.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-11.2.inc b/meta/recipes-devtools/gcc/gcc-11.2.inc index e352c958de..f07a5be507 100644 --- a/meta/recipes-devtools/gcc/gcc-11.2.inc +++ b/meta/recipes-devtools/gcc/gcc-11.2.inc | |||
@@ -59,6 +59,7 @@ SRC_URI = "\ | |||
59 | file://0037-libatomic-Do-not-enforce-march-on-aarch64.patch \ | 59 | file://0037-libatomic-Do-not-enforce-march-on-aarch64.patch \ |
60 | file://0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch \ | 60 | file://0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch \ |
61 | file://0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch \ | 61 | file://0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch \ |
62 | file://0001-Fix-install-path-of-linux64.h.patch \ | ||
62 | file://0001-CVE-2021-35465.patch \ | 63 | file://0001-CVE-2021-35465.patch \ |
63 | file://0002-CVE-2021-35465.patch \ | 64 | file://0002-CVE-2021-35465.patch \ |
64 | file://0003-CVE-2021-35465.patch \ | 65 | file://0003-CVE-2021-35465.patch \ |
diff --git a/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch b/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch new file mode 100644 index 0000000000..9201538f0e --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 58211c7ceb0510b2a11a7f1da3c7fa968c658749 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Gherzan <andrei.gherzan@huawei.com> | ||
3 | Date: Wed, 22 Dec 2021 12:49:25 +0100 | ||
4 | Subject: [PATCH] Fix install path of linux64.h | ||
5 | |||
6 | We add linux64.h to tm includes[1] as a relative path to B. This patch | ||
7 | adapts the install path of linux64.h to match the include in tm.h. | ||
8 | |||
9 | [1] 0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch | ||
10 | |||
11 | Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> | ||
12 | |||
13 | Upstream-Status: Inappropriate [configuration] | ||
14 | --- | ||
15 | gcc/Makefile.in | 2 ++ | ||
16 | 1 file changed, 2 insertions(+) | ||
17 | |||
18 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
19 | index 9b17d120a..d175ec4e3 100644 | ||
20 | --- a/gcc/Makefile.in | ||
21 | +++ b/gcc/Makefile.in | ||
22 | @@ -3693,6 +3693,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype | ||
23 | "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \ | ||
24 | | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \ | ||
25 | base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \ | ||
26 | + ./linux64.h ) \ | ||
27 | + base=`dirname $$path`;;\ | ||
28 | *) base=`basename $$path` ;; \ | ||
29 | esac; \ | ||
30 | dest=$(plugin_includedir)/$$base; \ | ||
31 | -- | ||
32 | 2.25.1 | ||
33 | |||