diff options
author | Alexey Brodkin <Alexey.Brodkin@synopsys.com> | 2018-09-20 23:42:32 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-22 15:52:12 -0700 |
commit | 651ede75e98b9e056073a3e69ed138a7c1e7b8a4 (patch) | |
tree | 6980737eda094e48f5524e3f046ed3b477b483f2 | |
parent | c32b26ce8d43f39aecf4b53175690ee66e03c376 (diff) | |
download | poky-651ede75e98b9e056073a3e69ed138a7c1e7b8a4.tar.gz |
gcc: Fix specs generation for ARC
GCC's built-in spec for LD is missing a space after
"--eh-frame-hdr" thus with the next option merged together they
are not understood by LD and so LD fails.
Back-port from upstream GCC, see:
https://github.com/gcc-mirror/gcc/commit/892142379c6b99fe8c3ebdfe0b79e2a435228c1d
(From OE-Core rev: 0757187bdbed3025b022a82dd85ee35dc7b71f1f)
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-8.2.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch | 44 |
2 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-8.2.inc b/meta/recipes-devtools/gcc/gcc-8.2.inc index 889187e9c4..866a77558b 100644 --- a/meta/recipes-devtools/gcc/gcc-8.2.inc +++ b/meta/recipes-devtools/gcc/gcc-8.2.inc | |||
@@ -69,6 +69,7 @@ SRC_URI = "\ | |||
69 | file://0038-fix-segmentation-fault-in-precompiled-header-generat.patch \ | 69 | file://0038-fix-segmentation-fault-in-precompiled-header-generat.patch \ |
70 | file://0039-Fix-for-testsuite-failure.patch \ | 70 | file://0039-Fix-for-testsuite-failure.patch \ |
71 | file://0040-Re-introduce-spe-commandline-options.patch \ | 71 | file://0040-Re-introduce-spe-commandline-options.patch \ |
72 | file://0041-ARC-fix-spec-gen.patch \ | ||
72 | ${BACKPORTS} \ | 73 | ${BACKPORTS} \ |
73 | " | 74 | " |
74 | BACKPORTS = "\ | 75 | BACKPORTS = "\ |
diff --git a/meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch b/meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch new file mode 100644 index 0000000000..cbd5e41ab1 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 892142379c6b99fe8c3ebdfe0b79e2a435228c1d Mon Sep 17 00:00:00 2001 | ||
2 | From: claziss <claziss@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Mon, 17 Sep 2018 08:52:10 +0000 | ||
4 | Subject: [PATCH] [ARC] Update LINK_EH_SPEC linker spec. | ||
5 | |||
6 | With no trailing space in LINK_EH_SPEC linker spec gets generated as: | ||
7 | ------------------------>8--------------------- | ||
8 | %{!r:--build-id} --eh-frame-hdr%{h*} ... | ||
9 | ------------------------>8--------------------- | ||
10 | |||
11 | or even worse if hash style is added: | ||
12 | ------------------------>8--------------------- | ||
13 | %{!r:--build-id} --eh-frame-hdr--hash-style=sysv %{h*} ... | ||
14 | ------------------------>8--------------------- | ||
15 | |||
16 | Now if that spec is really used by LD then it fails inevitably | ||
17 | saying that it doesn't know option "--eh-frame-hdr--hash-style=sysv". | ||
18 | |||
19 | 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com> | ||
20 | |||
21 | * config/arc/linux.h (LINK_EH_SPEC): Add missing space. | ||
22 | |||
23 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264361 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
24 | |||
25 | Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> | ||
26 | |||
27 | Upstream-Status: Backport[https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=892142379c6b] | ||
28 | --- | ||
29 | gcc/config/arc/linux.h | 2 +- | ||
30 | 1 files changed, 1 insertions(+), 1 deletion(-) | ||
31 | |||
32 | diff --git a/gcc/config/arc/linux.h b/gcc/config/arc/linux.h | ||
33 | index 96d548eae341..62ebe4de0fc7 100644 | ||
34 | --- a/gcc/config/arc/linux.h | ||
35 | +++ b/gcc/config/arc/linux.h | ||
36 | @@ -98,7 +98,7 @@ along with GCC; see the file COPYING3. If not see | ||
37 | Signalize that because we have fde-glibc, we don't need all C shared libs | ||
38 | linked against -lgcc_s. */ | ||
39 | #undef LINK_EH_SPEC | ||
40 | -#define LINK_EH_SPEC "--eh-frame-hdr" | ||
41 | +#define LINK_EH_SPEC "--eh-frame-hdr " | ||
42 | #endif | ||
43 | |||
44 | #undef SUBTARGET_CPP_SPEC | ||