summaryrefslogtreecommitdiff
path: root/sys-boot/gnu-efi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-07 12:37:21 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-07 12:37:21 +0100
commitb8c7370a682e4e29cda623222d17a790c01c3642 (patch)
treef6caa14689bd00a5760eadaa381ff41e50ef3c1b /sys-boot/gnu-efi
parent8a4997a7e2d1e36c089d4d76935b5a902d98d3d0 (diff)
gentoo auto-resync : 07:08:2024 - 12:37:20
Diffstat (limited to 'sys-boot/gnu-efi')
-rw-r--r--sys-boot/gnu-efi/Manifest7
-rw-r--r--sys-boot/gnu-efi/files/gnu-efi-3.0.18-refind.patch126
-rw-r--r--sys-boot/gnu-efi/files/gnu-efi-3.0.18-remove-linux-headers.patch14
-rw-r--r--sys-boot/gnu-efi/gnu-efi-3.0.18-r1.ebuild90
-rw-r--r--sys-boot/gnu-efi/gnu-efi-3.0.18-r2.ebuild2
-rw-r--r--sys-boot/gnu-efi/gnu-efi-3.0.18-r3.ebuild (renamed from sys-boot/gnu-efi/gnu-efi-3.0.18.ebuild)26
6 files changed, 44 insertions, 221 deletions
diff --git a/sys-boot/gnu-efi/Manifest b/sys-boot/gnu-efi/Manifest
index dc3139e67ad1..121364a2282c 100644
--- a/sys-boot/gnu-efi/Manifest
+++ b/sys-boot/gnu-efi/Manifest
@@ -1,12 +1,11 @@
AUX gnu-efi-3.0.18-clang.patch 904 BLAKE2B dd7c2aed740e9ecfcd918ab4ce4ab05090792f7c77493dbd401b3a54aa966748bb4aaad44d5787125c5e931506b529e91829924822413f00ab2768ef78f37bdb SHA512 9464474ec0c945d2546549f78ab38e30eaf9108dcca2ece33c3c83b3ab3bc471c8cea08197c9ffb0fcd1aa45b8544e2e57d988ca05127e5dc0dc8e945d323033
-AUX gnu-efi-3.0.18-refind.patch 3134 BLAKE2B 22c9f9b35c51dc0a6f3860d30c327b9ece84fa47bd7d867eda7d21f09a6020b200147ee4842440b43ca3b3069ef216eda7fe4e853506a6593c129aed19db3d49 SHA512 6caa3816ca98f5bdcac1204420eccf3911b1ba1faad41a8a080264a177b0f5ded60238fbb76cce279671b46776a483b696a0d51e2eebcef387a35c0330f7d58a
+AUX gnu-efi-3.0.18-remove-linux-headers.patch 360 BLAKE2B 2000100455634cfc6244ac1a54e1318b37efc0e411f9780d520cff7d30524f0e61e2980f0067cc27450375745f948671b3e4b4674d87db6f6675f93b590570f0 SHA512 1eb9d2299fd078c5616bbb4e9323544ef70039992cc5262c1bf9e41f4f9c40de70ad4aee973e9d5d665a1b7cc2d2a6b721d13b17326af0cd7cd0b735a7fd8c7e
AUX gnu-efi-3.0.9-fix-clang-build.patch 691 BLAKE2B 5b3f60e27982cd9e2cfb385851af4840d0301c1fb590d34b029e18a239a232ecca6a62431e10138d4e12cb44a5f64b415936935c1bdaf601dcf605ebe892de54 SHA512 1f77f4a5dcd2f1589cd6950da3462f2508d0ac51c2d2268400414c336ddd41fcf430e79fb702fd5aa99cb4be0bf0fc6eabe9362d736a1223b1c53c2c0b319584
DIST gnu-efi-3.0.15.tar.bz2 159399 BLAKE2B 0df93d8cacfa1e6d4b7731e32287d4386da9375c5e5c5847df8a29c99d70f5c24b14abc5e44ab9d0a39a6ec96682eb2b5e84d81a5a142d44a50a522a4ae0e3c2 SHA512 64d408b6d115bdc6eebae12fbd6cd907ed5f847f54e506c1e8f8ea5de38a95cf6fac66ab1009bd1d0bd2d54ad45ad598d29bcc303926a5899bf5cc25448cbb2f
DIST gnu-efi-3.0.17.tar.bz2 165568 BLAKE2B 27f8171b411a6a8a138d44d91c7e4e4291aa399562825d51a398913572119482ffeb303d7508ae13eacd2cd10b8f5098405ab16eb56243587efe93235f661285 SHA512 0893ca234272584f889b1ae1c75341a9ceee60acfd32765daa5d704191ba00450536a287b949304c6d055d1bf125cc29e24fc41df8e5230e0da4f9d944876512
DIST gnu-efi-3.0.18.tar.bz2 167567 BLAKE2B e080fa4c57a281452a6473304871304d1b5c30d42ee728b4c0c084258ed2f6f2099c068ec5841cee81ecf664dd658dee3b94d68324ebaa498cb49cec4f7f7df9 SHA512 39f9fa14b880441a94a04400ff8850efdd9474929e5501dfd05af06e7747b4d0f7cb742ac811c7026cf52d00508efb73018be4d61d63a1211de0cd931cbc473d
EBUILD gnu-efi-3.0.15.ebuild 1923 BLAKE2B 754b9d84be37fa39d42a752c8ea63754d7acc111403dc22c9531f665ae78796ce6a2d004de4e8c1eacff4e5456091af6987a42732bc1200e4b73041079beb491 SHA512 22508b5c37a49ed29cddd57e08565bf79c5c6620921e8b262b9f930298f583ed24c5958a4862984ed5f1a9f286a7eecdc3c7f5f45ee4508b3e6ffd14b307fbd3
EBUILD gnu-efi-3.0.17.ebuild 1954 BLAKE2B 03313137ea41a1a8ad4880076296e7dbc38e1276ff3a46187c8c5fe0db7b833c437e21fb86e15a992ec45824a23798bdd53d16770b0bb1117c9a1afec578ed3d SHA512 c113cdd429bdb6c86641b8e76c859f4e28d377d7f2d441857d077cca0b7b6bc1e54071f4354cef2fc5d17ae2cf7e4312b0a76b622f6428a51ce4a02413c2bc41
-EBUILD gnu-efi-3.0.18-r1.ebuild 1971 BLAKE2B 5fa0fb8a40c59b33a2b8bdbae2f4304460bb84bb1eafae0b210aa6394e111ed11461f9ad38fb7cbf43a3a8086eb2aa4b2712b6d098f7d63c77ae7deafd671a02 SHA512 d8e47be2281373c720c0851580e36afdc255dca6402bb759c416b456244e29c78a6c8032bb89fb021a1a82deadff05b19b41bdae8ebdd7b49b0110233a1086d1
-EBUILD gnu-efi-3.0.18-r2.ebuild 1942 BLAKE2B 95e0ad4afa13a39990120c277d3b2dd31d02f15b539e5355593ca642f82810d080bb6074e45bef28f503cc3c070bbdba8fb110f05514f2b778511a0f54fddcbd SHA512 c3b7cc45ef9a57bcc569a6396b77fe9389cfb52fc0a644199afd545ae3bdb3cf6017949bb8db4e88b91d50a2473e5bd92206369b8d5940dc8d10441453f2e81e
-EBUILD gnu-efi-3.0.18.ebuild 1897 BLAKE2B c2bf428fc4688807ea1cb6db1fce16119abd72ec9aae861f87d6bf700f1a22d040ab744cf874998dddce460680af380884066d50172ea55e79c24ade528fe037 SHA512 5ad5f279e6bb93f0f13dbcad88026f1420c23fc802224fa6db676544679e9dbd09810659bc6f0102e9ced30c88a5b6095041781a5d5b1be6e8bef9b9957d50a6
+EBUILD gnu-efi-3.0.18-r2.ebuild 1938 BLAKE2B 18a2d294be0f855a8302806af7c893c6febbe598bd993e8036ef763ed9e5cac353a7ed87f5c572d3d6e9db8f8ab28eace207e14059493e656364c7c1b8248ca1 SHA512 7344022247b0cc0107f695893e20da5b62519e7f36dbd5b98d2195ade76f32e83e0e756cff8b877f14a9860743cc148380168de780c58b36eaf22a1c415e0bce
+EBUILD gnu-efi-3.0.18-r3.ebuild 2472 BLAKE2B a2f6d030c89b88d0afbf895678e8b13105e873616ac73cfb468f9d57000207475d54fd63144befff3255d13b1e0e226cdb236f8aa13cfa87cb82198db8aa47cb SHA512 d9b73839447277aea53e2bf57b52b188bc314324c4a1006871bd34159aceb642f223def6d6dc2a84b03b693774de997cc8c21ffafcdf814a7eb8c3e79b3301fb
MISC metadata.xml 381 BLAKE2B a3cbadc2ae97d29ac87c04f3209cd7f4879ef70903907f319b425f038f07fd6bbc357a0291e70909a3b0b2097de6b63daf0f568d0fd7097c7bd2d9c9c7f3a963 SHA512 abbdda69a47f94442977af7491596e40873767256f5e75c3c06b614a369ec8cb7103a132e77a95c99ba24e4b205e5c3fc267039c920c1268a19b17e4ac779b79
diff --git a/sys-boot/gnu-efi/files/gnu-efi-3.0.18-refind.patch b/sys-boot/gnu-efi/files/gnu-efi-3.0.18-refind.patch
deleted file mode 100644
index d198426c4635..000000000000
--- a/sys-boot/gnu-efi/files/gnu-efi-3.0.18-refind.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-https://github.com/ncroxon/gnu-efi/commit/f5bb548df572c992fe3389a586bec3a19b092c18
-https://github.com/ncroxon/gnu-efi/commit/6b9dae0bef0fab82230a6672eaadd38d739e3e1e
-
-From f5bb548df572c992fe3389a586bec3a19b092c18 Mon Sep 17 00:00:00 2001
-From: Callum Farmer <gmbr3@opensuse.org>
-Date: Thu, 25 Apr 2024 15:27:26 +0100
-Subject: [PATCH] Align RTLIB CopyMem/SetMem with normal versions
-
-Looks like 699e452654df6de53890ae994756b0d47237e3ac broke rEFInd
-(https://sourceforge.net/p/refind/code/ci/189e405630293445df8565e36b831bba56e87093/)
---- a/inc/efirtlib.h
-+++ b/inc/efirtlib.h
-@@ -45,6 +45,7 @@ RtZeroMem (
- );
-
- VOID
-+EFIAPI
- RUNTIMEFUNCTION
- RtSetMem (
- IN VOID *Buffer,
-@@ -53,10 +54,11 @@ RtSetMem (
- );
-
- VOID
-+EFIAPI
- RUNTIMEFUNCTION
- RtCopyMem (
- IN VOID *Dest,
-- IN CONST VOID *Src,
-+ IN VOID *Src,
- IN UINTN len
- );
-
---- a/lib/runtime/efirtlib.c
-+++ b/lib/runtime/efirtlib.c
-@@ -42,6 +42,7 @@ RtZeroMem (
- #pragma RUNTIME_CODE(RtSetMem)
- #endif
- VOID
-+EFIAPI
- RUNTIMEFUNCTION
- RtSetMem (
- IN VOID *Buffer,
-@@ -61,10 +62,11 @@ RtSetMem (
- #pragma RUNTIME_CODE(RtCopyMem)
- #endif
- VOID
-+EFIAPI
- RUNTIMEFUNCTION
- RtCopyMem (
- IN VOID *Dest,
-- IN CONST VOID *Src,
-+ IN VOID *Src,
- IN UINTN len
- )
- {
-
-From 6b9dae0bef0fab82230a6672eaadd38d739e3e1e Mon Sep 17 00:00:00 2001
-From: Callum Farmer <gmbr3@opensuse.org>
-Date: Sat, 27 Apr 2024 13:14:28 +0100
-Subject: [PATCH] Fixup string functions for new CopyMem
-
-Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
---- a/lib/runtime/rtstr.c
-+++ b/lib/runtime/rtstr.c
-@@ -69,10 +69,13 @@ RtStrnCpy (
- )
- // copy strings
- {
-+ CHAR16 CopySrc = *Src;
-+ CHAR16 *PCopySrc = &CopySrc;
-+
- UINTN Size = RtStrnLen(Src, Len);
- if (Size != Len)
- RtSetMem(Dest + Size, (Len - Size) * sizeof(CHAR16), '\0');
-- RtCopyMem(Dest, Src, Size * sizeof(CHAR16));
-+ RtCopyMem(Dest, PCopySrc, Size * sizeof(CHAR16));
- }
-
- #ifndef __GNUC__
-@@ -105,10 +108,13 @@ RtStpnCpy (
- )
- // copy strings
- {
-+ CHAR16 CopySrc = *Src;
-+ CHAR16 *PCopySrc = &CopySrc;
-+
- UINTN Size = RtStrnLen(Src, Len);
- if (Size != Len)
- RtSetMem(Dest + Size, (Len - Size) * sizeof(CHAR16), '\0');
-- RtCopyMem(Dest, Src, Size * sizeof(CHAR16));
-+ RtCopyMem(Dest, PCopySrc, Size * sizeof(CHAR16));
- return Dest + Size;
- }
-
-@@ -137,10 +143,12 @@ RtStrnCat (
- )
- {
- UINTN DestSize, Size;
-+ CHAR16 CopySrc = *Src;
-+ CHAR16 *PCopySrc = &CopySrc;
-
- DestSize = RtStrLen(Dest);
- Size = RtStrnLen(Src, Len);
-- RtCopyMem(Dest + DestSize, Src, Size * sizeof(CHAR16));
-+ RtCopyMem(Dest + DestSize, PCopySrc, Size * sizeof(CHAR16));
- Dest[DestSize + Size] = '\0';
- }
-
---- a/lib/str.c
-+++ b/lib/str.c
-@@ -201,11 +201,13 @@ StrDuplicate (
- {
- CHAR16 *Dest;
- UINTN Size;
-+ CHAR16 CopySrc = *Src;
-+ CHAR16 *PCopySrc = &CopySrc;
-
- Size = StrSize(Src);
- Dest = AllocatePool (Size);
- if (Dest) {
-- CopyMem (Dest, (void *)Src, Size);
-+ CopyMem (Dest, PCopySrc, Size);
- }
- return Dest;
- }
diff --git a/sys-boot/gnu-efi/files/gnu-efi-3.0.18-remove-linux-headers.patch b/sys-boot/gnu-efi/files/gnu-efi-3.0.18-remove-linux-headers.patch
new file mode 100644
index 000000000000..e997aae58836
--- /dev/null
+++ b/sys-boot/gnu-efi/files/gnu-efi-3.0.18-remove-linux-headers.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/888829
+
+--- a/apps/Makefile
++++ b/apps/Makefile
+@@ -41,9 +41,7 @@
+
+ include $(SRCDIR)/../Make.defaults
+
+-LINUX_HEADERS = /usr/src/sys/build
+ APPSDIR = $(LIBDIR)/gnuefi/apps
+-CPPFLAGS += -D__KERNEL__ -I$(LINUX_HEADERS)/include
+ CRTOBJS = $(TOPDIR)/$(ARCH)/gnuefi/crt0-efi-$(ARCH).o
+
+ LDSCRIPT = $(TOPDIR)/gnuefi/elf_$(ARCH)_efi.lds
diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.18-r1.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.18-r1.ebuild
deleted file mode 100644
index 4261653d9664..000000000000
--- a/sys-boot/gnu-efi/gnu-efi-3.0.18-r1.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 2004-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-DESCRIPTION="Library for build EFI Applications"
-HOMEPAGE="https://sourceforge.net/projects/gnu-efi/"
-SRC_URI="https://downloads.sourceforge.net/gnu-efi/${P}.tar.bz2"
-
-# inc/, lib/ dirs (README.efilib)
-# - BSD-2
-# gnuefi dir:
-# - BSD (3-cluase): crt0-efi-ia32.S
-# - GPL-2+ : setjmp_ia32.S
-LICENSE="GPL-2+ BSD BSD-2"
-SLOT="0"
-KEYWORDS="-* amd64 arm arm64 ~ia64 ~riscv x86"
-IUSE="abi_x86_32 abi_x86_64 custom-cflags"
-REQUIRED_USE="
- amd64? ( || ( abi_x86_32 abi_x86_64 ) )
- x86? ( || ( abi_x86_32 abi_x86_64 ) )
-"
-
-# These objects get run early boot (i.e. not inside of Linux),
-# so doing these QA checks on them doesn't make sense.
-QA_EXECSTACK="usr/*/lib*efi.a:* usr/*/crt*.o"
-RESTRICT="strip"
-
-PATCHES=(
- "${FILESDIR}"/${P}-clang.patch
- "${FILESDIR}"/${P}-refind.patch
-)
-
-src_prepare() {
- default
- sed -i -e "s/-Werror//" Make.defaults || die
-}
-
-efimake() {
- local arch=
- case ${CHOST} in
- arm*) arch=arm ;;
- aarch64*) arch=aarch64 ;;
- ia64*) arch=ia64 ;;
- i?86*) arch=ia32 ;;
- riscv64*) arch=riscv64;;
- x86_64*) arch=x86_64 ;;
- *) die "Unknown CHOST" ;;
- esac
-
- local args=(
- ARCH="${arch}"
- HOSTCC="${BUILD_CC}"
- CC="${CC}"
- AS="${AS}"
- LD="${LD}"
- AR="${AR}"
- OBJCOPY="${OBJCOPY}"
- PREFIX="${EPREFIX}/usr"
- LIBDIR='$(PREFIX)'/$(get_libdir)
- )
- emake -j1 "${args[@]}" "$@"
-}
-
-src_compile() {
- tc-export BUILD_CC AR AS CC LD OBJCOPY
-
- if ! use custom-cflags; then
- unset CFLAGS CPPFLAGS LDFLAGS
- fi
-
- if use amd64 || use x86; then
- use abi_x86_32 && CHOST=i686 ABI=x86 efimake
- use abi_x86_64 && CHOST=x86_64 ABI=amd64 efimake
- else
- efimake
- fi
-}
-
-src_install() {
- if use amd64 || use x86; then
- use abi_x86_32 && CHOST=i686 ABI=x86 efimake INSTALLROOT="${D}" install
- use abi_x86_64 && CHOST=x86_64 ABI=amd64 efimake INSTALLROOT="${D}" install
- else
- efimake INSTALLROOT="${D}" install
- fi
- einstalldocs
-}
diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.18-r2.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.18-r2.ebuild
index 32be646c8652..4a3db4824f5b 100644
--- a/sys-boot/gnu-efi/gnu-efi-3.0.18-r2.ebuild
+++ b/sys-boot/gnu-efi/gnu-efi-3.0.18-r2.ebuild
@@ -16,7 +16,7 @@ SRC_URI="https://downloads.sourceforge.net/gnu-efi/${P}.tar.bz2"
# - GPL-2+ : setjmp_ia32.S
LICENSE="GPL-2+ BSD BSD-2"
SLOT="0"
-KEYWORDS="-* ~amd64 ~arm ~arm64 ~ia64 ~riscv ~x86"
+KEYWORDS="-* amd64 arm arm64 ~ia64 ~riscv x86"
IUSE="abi_x86_32 abi_x86_64 custom-cflags"
REQUIRED_USE="
amd64? ( || ( abi_x86_32 abi_x86_64 ) )
diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.18.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.18-r3.ebuild
index bfee671f37fb..5e1f208f9dba 100644
--- a/sys-boot/gnu-efi/gnu-efi-3.0.18.ebuild
+++ b/sys-boot/gnu-efi/gnu-efi-3.0.18-r3.ebuild
@@ -23,11 +23,37 @@ REQUIRED_USE="
x86? ( || ( abi_x86_32 abi_x86_64 ) )
"
+# for ld.bfd and objcopy
+BDEPEND="sys-devel/binutils"
+
# These objects get run early boot (i.e. not inside of Linux),
# so doing these QA checks on them doesn't make sense.
QA_EXECSTACK="usr/*/lib*efi.a:* usr/*/crt*.o"
RESTRICT="strip"
+PATCHES=(
+ "${FILESDIR}"/${P}-clang.patch
+ "${FILESDIR}"/${PN}-3.0.18-remove-linux-headers.patch
+)
+
+check_and_set_objcopy() {
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ # bug #931792
+ # llvm-objcopy does not support EFI target, try to use binutils objcopy or fail
+ tc-export OBJCOPY
+ OBJCOPY="${OBJCOPY/llvm-/}"
+ LANG=C LC_ALL=C "${OBJCOPY}" --help | grep -q '\<pei-' || die "${OBJCOPY} (objcopy) does not support EFI target"
+ fi
+}
+
+pkg_pretend() {
+ check_and_set_objcopy
+}
+
+pkg_setup() {
+ check_and_set_objcopy
+}
+
src_prepare() {
default
sed -i -e "s/-Werror//" Make.defaults || die