Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: openembedded-core@lists.openembedded.org
Cc: linux-snps-arc@lists.infradead.org,
	Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Subject: [PATCH 10/10] gcc: Fix specs generation for ARC
Date: Tue, 18 Sep 2018 00:29:43 +0300	[thread overview]
Message-ID: <20180917212943.27237-11-abrodkin@synopsys.com> (raw)
In-Reply-To: <20180917212943.27237-1-abrodkin@synopsys.com>

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

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
 meta/recipes-devtools/gcc/gcc-8.2.inc              |  1 +
 .../gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch        | 40 ++++++++++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch

diff --git a/meta/recipes-devtools/gcc/gcc-8.2.inc b/meta/recipes-devtools/gcc/gcc-8.2.inc
index 889187e..866a775 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 = "\
            file://0038-fix-segmentation-fault-in-precompiled-header-generat.patch \
            file://0039-Fix-for-testsuite-failure.patch \
            file://0040-Re-introduce-spe-commandline-options.patch \
+           file://0041-ARC-fix-spec-gen.patch \
            ${BACKPORTS} \
 "
 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 0000000..d746d79
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-8.2/0041-ARC-fix-spec-gen.patch
@@ -0,0 +1,40 @@
+From 892142379c6b99fe8c3ebdfe0b79e2a435228c1d Mon Sep 17 00:00:00 2001
+From: claziss <claziss@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 17 Sep 2018 08:52:10 +0000
+Subject: [PATCH] [ARC] Update LINK_EH_SPEC linker spec.
+
+With no trailing space in LINK_EH_SPEC linker spec gets generated as:
+------------------------>8---------------------
+%{!r:--build-id} --eh-frame-hdr%{h*} ...
+------------------------>8---------------------
+
+or even worse if hash style is added:
+------------------------>8---------------------
+%{!r:--build-id} --eh-frame-hdr--hash-style=sysv %{h*} ...
+------------------------>8---------------------
+
+Now if that spec is really used by LD then it fails inevitably
+saying that it doesn't know option "--eh-frame-hdr--hash-style=sysv".
+
+2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
+
+	* config/arc/linux.h (LINK_EH_SPEC): Add missing space.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264361 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/arc/linux.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/config/arc/linux.h b/gcc/config/arc/linux.h
+index 96d548eae341..62ebe4de0fc7 100644
+--- a/gcc/config/arc/linux.h
++++ b/gcc/config/arc/linux.h
+@@ -98,7 +98,7 @@ along with GCC; see the file COPYING3.  If not see
+    Signalize that because we have fde-glibc, we don't need all C shared libs
+    linked against -lgcc_s.  */
+ #undef LINK_EH_SPEC
+-#define LINK_EH_SPEC "--eh-frame-hdr"
++#define LINK_EH_SPEC "--eh-frame-hdr "
+ #endif
+ 
+ #undef SUBTARGET_CPP_SPEC
-- 
1.8.3.1



  parent reply	other threads:[~2018-09-17 21:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17 21:29 [PATCH 00/10] Introduce ARC port of OpenEmbedded Alexey Brodkin
2018-09-17 21:29 ` [PATCH 01/10] siteinfo: Define data for ARC Alexey Brodkin
2018-09-18 23:24   ` Khem Raj
2018-09-17 21:29 ` [PATCH 02/10] site: Add ARC linux Alexey Brodkin
2018-09-17 21:29 ` [PATCH 03/10] kernel-arch.bbclass: Add ARC to kernel arch map Alexey Brodkin
2018-09-17 21:29 ` [PATCH 04/10] openssl: Add support for ARC Alexey Brodkin
2018-09-17 21:29 ` [PATCH 05/10] nspr: Add ARC support Alexey Brodkin
2018-09-17 21:29 ` [PATCH 06/10] libgpg-error: " Alexey Brodkin
2018-09-17 21:29 ` [PATCH 07/10] icu: " Alexey Brodkin
2018-09-17 21:29 ` [PATCH 08/10] gcc: Disable libitm for ARC Alexey Brodkin
2018-09-17 21:29 ` [PATCH 09/10] binutils: Fix Glibc building " Alexey Brodkin
2018-09-17 21:29 ` Alexey Brodkin [this message]
2018-09-18 23:21   ` [PATCH 10/10] gcc: Fix specs generation " Khem Raj
2018-09-17 22:04 ` ✗ patchtest: failure for Introduce ARC port of OpenEmbedded Patchwork
2018-09-18 23:28 ` [PATCH 00/10] " Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180917212943.27237-11-abrodkin@synopsys.com \
    --to=alexey.brodkin@synopsys.com \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox