<div><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 17, 2018 at 2:30 PM Alexey Brodkin <<a href="mailto:Alexey.Brodkin@synopsys.com">Alexey.Brodkin@synopsys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">GCC's built-in spec for LD is missing a space after<br>
"--eh-frame-hdr" thus with the next option merged together they<br>
are not understood by LD and so LD fails.<br>
<br>
Back-port from upstream GCC, see:<br>
<a href="https://github.com/gcc-mirror/gcc/commit/892142379c6b99fe8c3ebdfe0b79e2a435228c1d" rel="noreferrer" target="_blank">https://github.com/gcc-mirror/gcc/commit/892142379c6b99fe8c3ebdfe0b79e2a435228c1d</a><br>
</blockquote><div dir="auto"><br></div><div dir="auto">Can you add this to </div><div dir="auto">Upstream-Status tag in patch file itself</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Signed-off-by: Alexey Brodkin <<a href="mailto:abrodkin@synopsys.com" target="_blank">abrodkin@synopsys.com</a>><br>
---<br>
meta/recipes-devtools/gcc/gcc-8.2.inc | 1 +<br>
.../gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch | 40 ++++++++++++++++++++++<br>
2 files changed, 41 insertions(+)<br>
create mode 100644 meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch<br>
<br>
diff --git a/meta/recipes-devtools/gcc/gcc-8.2.inc b/meta/recipes-devtools/gcc/gcc-8.2.inc<br>
index 889187e..866a775 100644<br>
--- a/meta/recipes-devtools/gcc/gcc-8.2.inc<br>
+++ b/meta/recipes-devtools/gcc/gcc-8.2.inc<br>
@@ -69,6 +69,7 @@ SRC_URI = "\<br>
file://0038-fix-segmentation-fault-in-precompiled-header-generat.patch \<br>
file://0039-Fix-for-testsuite-failure.patch \<br>
file://0040-Re-introduce-spe-commandline-options.patch \<br>
+ file://0041-ARC-fix-spec-gen.patch \<br>
${BACKPORTS} \<br>
"<br>
BACKPORTS = "\<br>
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<br>
new file mode 100644<br>
index 0000000..d746d79<br>
--- /dev/null<br>
+++ b/meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch<br>
@@ -0,0 +1,40 @@<br>
+From 892142379c6b99fe8c3ebdfe0b79e2a435228c1d Mon Sep 17 00:00:00 2001<br>
+From: claziss <claziss@138bc75d-0d04-0410-961f-82ee72b054a4><br>
+Date: Mon, 17 Sep 2018 08:52:10 +0000<br>
+Subject: [PATCH] [ARC] Update LINK_EH_SPEC linker spec.<br>
+<br>
+With no trailing space in LINK_EH_SPEC linker spec gets generated as:<br>
+------------------------>8---------------------<br>
+%{!r:--build-id} --eh-frame-hdr%{h*} ...<br>
+------------------------>8---------------------<br>
+<br>
+or even worse if hash style is added:<br>
+------------------------>8---------------------<br>
+%{!r:--build-id} --eh-frame-hdr--hash-style=sysv %{h*} ...<br>
+------------------------>8---------------------<br>
+<br>
+Now if that spec is really used by LD then it fails inevitably<br>
+saying that it doesn't know option "--eh-frame-hdr--hash-style=sysv".<br>
+<br>
+2018-09-17 Alexey Brodkin <<a href="mailto:abrodkin@synopsys.com" target="_blank">abrodkin@synopsys.com</a>><br>
+<br>
+ * config/arc/linux.h (LINK_EH_SPEC): Add missing space.<br>
+<br>
+git-svn-id: svn+ssh://<a href="http://gcc.gnu.org/svn/gcc/trunk@264361" rel="noreferrer" target="_blank">gcc.gnu.org/svn/gcc/trunk@264361</a> 138bc75d-0d04-0410-961f-82ee72b054a4<br>
+---<br>
+ gcc/config/arc/linux.h | 2 +-<br>
+ 1 files changed, 1 insertions(+), 1 deletion(-)<br>
+<br>
+diff --git a/gcc/config/arc/linux.h b/gcc/config/arc/linux.h<br>
+index 96d548eae341..62ebe4de0fc7 100644<br>
+--- a/gcc/config/arc/linux.h<br>
++++ b/gcc/config/arc/linux.h<br>
+@@ -98,7 +98,7 @@ along with GCC; see the file COPYING3. If not see<br>
+ Signalize that because we have fde-glibc, we don't need all C shared libs<br>
+ linked against -lgcc_s. */<br>
+ #undef LINK_EH_SPEC<br>
+-#define LINK_EH_SPEC "--eh-frame-hdr"<br>
++#define LINK_EH_SPEC "--eh-frame-hdr "<br>
+ #endif<br>
+ <br>
+ #undef SUBTARGET_CPP_SPEC<br>
-- <br>
1.8.3.1<br>
<br>
</blockquote></div></div>