From 2fd57282f0262ca084e05b0f2c63fbada395d02b Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 16 Jan 2022 20:27:28 +0000 Subject: gentoo resync : 16.01.2021 --- sys-libs/efivar/Manifest | 3 ++ sys-libs/efivar/efivar-38.ebuild | 59 ++++++++++++++++++++++++ sys-libs/efivar/files/efivar-38-ia64-relro.patch | 45 ++++++++++++++++++ 3 files changed, 107 insertions(+) create mode 100644 sys-libs/efivar/efivar-38.ebuild create mode 100644 sys-libs/efivar/files/efivar-38-ia64-relro.patch (limited to 'sys-libs/efivar') diff --git a/sys-libs/efivar/Manifest b/sys-libs/efivar/Manifest index 621a71722090..1ad5e88c0002 100644 --- a/sys-libs/efivar/Manifest +++ b/sys-libs/efivar/Manifest @@ -1,4 +1,7 @@ AUX efivar-37-ia64-relro.patch 1702 BLAKE2B faa170f1a0ce1a9c48764cd49b466db4cdc40b3d79dc17954dd4bb043b4a4cae9a3610d14a85ad56fac655ad8a16e00f04cd4f29f506c6d3402d243f272e38d4 SHA512 35b56b6d8c4c682c55b4b2051367aa3be9c8f46950de6f2f4e30b75fdb9abacca037044b35df2efbf37289a72e294314f469b78f2cbd106c989ce43ffd7b05ff +AUX efivar-38-ia64-relro.patch 1831 BLAKE2B 08dc6882f261568d95a0059193dfd975e4482f34d533c3827eb6574e0e5db2d8f1b8aab061aa25db7daa940483ef89d08ba0f22b747cd36a0170f26f90c304fe SHA512 a4365c13d710b98049c93ad532afb483af7040167b3623f81d91c8f1a68094f8b4b458139c59224fb1fa11cde159913811c7c9f6c9d899ae70695e4d65798a2d DIST efivar-37.tar.bz2 109431 BLAKE2B 813d477d31562b773f6e19f20e9e237b94beed437ce221771770e7d46ff0e657530285f035dc942cc20609185be92dc50319bfe8e10dee642c8bd88403ef6ffe SHA512 305a82ed103c7e3d8f723934019d552677c73558768dd5341f87d0364f5c60824d24f5a8e1bf90075e825908085083d4ecdccec5ac757fd38ee6ac8fea28c3e4 +DIST efivar-38.tar.bz2 320221 BLAKE2B 0b96f3d71ddc2246e6a11a5cd32af3d007823c4a283186a428c3f145cd74425a31bd22c4671ad1ab252a3c572991bb1698381cb8bdf51efcbebd62befdc6c070 SHA512 c2f17297c863ece134a9dd758d237fd2df8c8d072f87af1d0bf2bcf9acfc7a53c25597f03fd4fb8cc664b205743d4ffa0ef1b068d0f73c58fa573d40993f3155 EBUILD efivar-37.ebuild 906 BLAKE2B 16ce203a6e47df3eaa0c357409db0d9db7a0dd490a8cf5ab0137edd651639c3358eaf3171aa67811ca195695e3c045290ca0c17bde0882ee43b3441de7155144 SHA512 28beefa3d20c1c8f7945872e1dcd17569b93028f72795854c601ad3064794e8193e61f56fff1ccd2c59a99083aa918e7f49152080cf17151938777626e2697b7 +EBUILD efivar-38.ebuild 1117 BLAKE2B 2a25375f4657c2f20cc4fbbdd47bdf627ecd4c1c882fbe7c350c3a38cd22561a8c3cd5ff3f80637236b3dbe98f868ff316e404c75cb39cf6f37f9b466432c103 SHA512 979e3343793d8e61d85a1d8232a8b5d4eebf8a9cc4221dadb5c7ea7f3969d230a26d98b0b6972c773820005f8e1f26acf47304e85e402997e367c2d8b1fc6987 MISC metadata.xml 330 BLAKE2B 0f894cb3c99d8540d6548f06f146360e20fcff309d867c1da96a15d07e5f1ebb2f03114de8527ddd28c26f4b42a7fa9903dd925015b962b4d4094dda86f76d65 SHA512 c03a2d22f945fd9e4a19143da20b884759e0aa88f73f42a70d47d5b1aeeb43201d9452919779d9c3e020371c3d1519a7068d59c0904043572ae0dd09633989e8 diff --git a/sys-libs/efivar/efivar-38.ebuild b/sys-libs/efivar/efivar-38.ebuild new file mode 100644 index 000000000000..e55e6a422cad --- /dev/null +++ b/sys-libs/efivar/efivar-38.ebuild @@ -0,0 +1,59 @@ +# 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 ~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() { + unset CROSS_COMPILE + export COMPILER=$(tc-getCC) + export HOSTCC=$(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 +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 +--- + 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:%