From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/efivar/, sys-libs/efivar/files/
Date: Sun, 25 Oct 2020 09:49:04 +0000 (UTC) [thread overview]
Message-ID: <1603619338.463cad343694a7f87f8b003ee6a1b683406e9d1b.slyfox@gentoo> (raw)
commit: 463cad343694a7f87f8b003ee6a1b683406e9d1b
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 25 09:48:40 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Oct 25 09:48:58 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=463cad34
sys-libs/efivar: drop -Werror equivalent for linker
ia64's ld does not implement '-z relro'. This means
'z relro --fatal-warnings' always fails on ia64.
The change drops '--fatal-warnings'.
Reported-by: Émeric Maschino
Closes: https://bugs.gentoo.org/749963
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
sys-libs/efivar/efivar-37.ebuild | 4 +++
sys-libs/efivar/files/efivar-37-ia64-relro.patch | 37 ++++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/sys-libs/efivar/efivar-37.ebuild b/sys-libs/efivar/efivar-37.ebuild
index d85015b8778..40c8e6430d9 100644
--- a/sys-libs/efivar/efivar-37.ebuild
+++ b/sys-libs/efivar/efivar-37.ebuild
@@ -19,6 +19,10 @@ DEPEND="${RDEPEND}
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-37-ia64-relro.patch
+)
+
src_prepare() {
default
sed -i -e 's/-Werror //' gcc.specs || die
diff --git a/sys-libs/efivar/files/efivar-37-ia64-relro.patch b/sys-libs/efivar/files/efivar-37-ia64-relro.patch
new file mode 100644
index 00000000000..92a79aec88e
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-37-ia64-relro.patch
@@ -0,0 +1,37 @@
+https://github.com/rhboot/efivar/pull/164
+https://bugs.gentoo.org/749963
+
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Mon, 19 Oct 2020 19:05:01 +0100
+Subject: [PATCH] gcc.specs: drop --fatal-warnings from linker options (ia64
+ compatibility)
+
+```
+$ LANG=C make HOSTCC=x86_64-pc-linux-gnu-gcc CC=ia64-unknown-linux-gnu-gcc HOST_ARCH=ia64
+ia64-unknown-linux-gnu-gcc ... \
+ -o libefivar.so ...
+/usr/libexec/gcc/ia64-unknown-linux-gnu/ld: warning: -z relro ignored
+collect2: error: ld returned 1 exit status
+make[1]: *** [/home/slyfox/dev/git/efivar/src/include/rules.mk:32: libefivar.so] Error 1
+```
+
+ia64 (and a few others) binutils target does not support '-z relro' and always
+issues a warning. --fatal-warnings spec option turns the build into always failing one.
+
+The change drops `--fatal-warnings` options from gcc.spec entirely.
+
+Reported-by: Émeric Maschino
+Bug: https://bugs.gentoo.org/749963
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+--- a/gcc.specs
++++ b/gcc.specs
+@@ -11,7 +11,7 @@
+ + %(efivar_cpp_options) -Wmaybe-uninitialized -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
+
+ *self_spec:
+-+ %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now}
+++ %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-static -static -Wl,-z,relro,-z,now}
+
+ *link:
+-+ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
+++ --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
next reply other threads:[~2020-10-25 9:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-25 9:49 Sergei Trofimovich [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-02-12 18:47 [gentoo-commits] repo/gentoo:master commit in: sys-libs/efivar/, sys-libs/efivar/files/ Mike Gilbert
2023-02-12 18:47 Mike Gilbert
2022-08-03 2:25 Sam James
2022-01-17 16:55 Mike Gilbert
2022-01-16 15:30 Mike Gilbert
2018-01-25 13:45 Lars Wendler
2016-02-12 18:44 Mike Gilbert
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=1603619338.463cad343694a7f87f8b003ee6a1b683406e9d1b.slyfox@gentoo \
--to=slyfox@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.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