summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2022-01-16 10:25:37 -0500
committerMike Gilbert <floppym@gentoo.org>2022-01-16 10:30:47 -0500
commit90f51c95eb90eea6c50624aad0a94143de827d8a (patch)
tree4ecd5fdb00147a83ae5276e40069d76b24aca1e9 /sys-libs
parenttoolchain-glibc.eclass: Begone foul spirit! (diff)
downloadgentoo-90f51c95eb90eea6c50624aad0a94143de827d8a.tar.gz
gentoo-90f51c95eb90eea6c50624aad0a94143de827d8a.tar.bz2
gentoo-90f51c95eb90eea6c50624aad0a94143de827d8a.zip
sys-libs/efivar: add 38
Closes: https://bugs.gentoo.org/831302 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/efivar/Manifest1
-rw-r--r--sys-libs/efivar/efivar-38.ebuild58
-rw-r--r--sys-libs/efivar/files/efivar-38-ia64-relro.patch45
3 files changed, 104 insertions, 0 deletions
diff --git a/sys-libs/efivar/Manifest b/sys-libs/efivar/Manifest
index c8afcced10cb..450ec0b1c8a3 100644
--- a/sys-libs/efivar/Manifest
+++ b/sys-libs/efivar/Manifest
@@ -1 +1,2 @@
DIST efivar-37.tar.bz2 109431 BLAKE2B 813d477d31562b773f6e19f20e9e237b94beed437ce221771770e7d46ff0e657530285f035dc942cc20609185be92dc50319bfe8e10dee642c8bd88403ef6ffe SHA512 305a82ed103c7e3d8f723934019d552677c73558768dd5341f87d0364f5c60824d24f5a8e1bf90075e825908085083d4ecdccec5ac757fd38ee6ac8fea28c3e4
+DIST efivar-38.tar.bz2 320221 BLAKE2B 0b96f3d71ddc2246e6a11a5cd32af3d007823c4a283186a428c3f145cd74425a31bd22c4671ad1ab252a3c572991bb1698381cb8bdf51efcbebd62befdc6c070 SHA512 c2f17297c863ece134a9dd758d237fd2df8c8d072f87af1d0bf2bcf9acfc7a53c25597f03fd4fb8cc664b205743d4ffa0ef1b068d0f73c58fa573d40993f3155
diff --git a/sys-libs/efivar/efivar-38.ebuild b/sys-libs/efivar/efivar-38.ebuild
new file mode 100644
index 000000000000..60060d4785fc
--- /dev/null
+++ b/sys-libs/efivar/efivar-38.ebuild
@@ -0,0 +1,58 @@
+# Copyright 2014-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="Tools and library to manipulate EFI variables"
+HOMEPAGE="https://github.com/rhinstaller/efivar"
+SRC_URI="https://github.com/rhinstaller/efivar/releases/download/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0/1"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc64 ~riscv ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ app-text/mandoc
+ test? ( sys-boot/grub:2 )
+"
+RDEPEND="
+ dev-libs/popt
+"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-3.18
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-38-ia64-relro.patch
+ )
+ default
+}
+
+src_configure() {
+ tc-export CC
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ tc-ld-disable-gold
+
+ export libdir="/usr/$(get_libdir)"
+
+ # https://bugs.gentoo.org/562004
+ unset LIBS
+
+ # Avoid -Werror
+ export ERRORS=
+
+ if [[ -n ${GCC_SPECS} ]]; then
+ # The environment overrides the command line.
+ GCC_SPECS+=":${S}/src/include/gcc.specs"
+ fi
+
+ # Used by tests/Makefile
+ export GRUB_PREFIX=grub
+}
diff --git a/sys-libs/efivar/files/efivar-38-ia64-relro.patch b/sys-libs/efivar/files/efivar-38-ia64-relro.patch
new file mode 100644
index 000000000000..2f3686cac444
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-38-ia64-relro.patch
@@ -0,0 +1,45 @@
+From 145c6593fa9206cc27229a9a40c49e4bed046739 Mon Sep 17 00:00:00 2001
+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)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+```
+$ 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` option from gcc.spec entirely.
+
+Rejected upstream in https://github.com/rhboot/efivar/pull/164.
+
+Reported-by: Émeric Maschino
+Bug: https://bugs.gentoo.org/749963
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ src/include/gcc.specs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/include/gcc.specs b/src/include/gcc.specs
+index ef28e2b..4deead5 100644
+--- a/src/include/gcc.specs
++++ b/src/include/gcc.specs
+@@ -5,4 +5,4 @@
+ + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} -grecord-gcc-switches
+
+ *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}
+--
+2.34.1
+