From 6d00d5fe1db14a76d58786da12f5cd36ceb62021 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 2 Feb 2026 07:31:10 +0000 Subject: [PATCH] sys-boot/gnu-efi: Sync with Gentoo It's from Gentoo commit 5ba0de52abd589e832fdff9f1defad4ce11a1460. Signed-off-by: Flatcar Buildbot --- .../portage-stable/sys-boot/gnu-efi/Manifest | 4 +- .../files/gnu-efi-3.0.9-fix-clang-build.patch | 19 ---- .../gnu-efi-4.0.0-remove-linux-headers.patch | 14 --- .../sys-boot/gnu-efi/gnu-efi-3.0.15.ebuild | 86 ------------------ .../sys-boot/gnu-efi/gnu-efi-3.0.17.ebuild | 87 ------------------- ...-efi-4.0.2.ebuild => gnu-efi-4.0.4.ebuild} | 6 +- 6 files changed, 5 insertions(+), 211 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/files/gnu-efi-3.0.9-fix-clang-build.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/files/gnu-efi-4.0.0-remove-linux-headers.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-3.0.15.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-3.0.17.ebuild rename sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/{gnu-efi-4.0.2.ebuild => gnu-efi-4.0.4.ebuild} (97%) diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/Manifest b/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/Manifest index 34271b011a..1bc364d76c 100644 --- a/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/Manifest @@ -1,5 +1,3 @@ -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 DIST gnu-efi-3.0.19.tar.gz 218588 BLAKE2B 78db87904e644406ce2eb1a0ef0f325e7ad0f004dd56199e319985c5d035b4755d545c1a6bcf749da08c7670132de28a3e53ba059956b841034c6b059e39042b SHA512 78a79f51bd271043edbf534427d8fbba3d8099e831a9643019899453e8363ebd4d43f6e5448cdde31d43a6bdb94ec32e73425138bfb614617b8886df90fc1665 -DIST gnu-efi-4.0.2.tar.gz 245063 BLAKE2B 4fe4a1000b2bcdb779aaa82e80f2a722a70230ac82f40e8fd4bfe67f73135e58e44a58b7cafce33702847ed00a1161fbc9565037298129f642ef1d875b04086c SHA512 a52e21daad16af6c1d9cff7f04076584251b77fe1eddc4e720d19de5d0a8d7cca5994b770d3236bcd9b2431918b427dd362ca7cb7e2a6e893ca4ba0e0ead9395 +DIST gnu-efi-4.0.4.tar.gz 245519 BLAKE2B a636ec81a830206b4d793689b6b4b85ab88b9061224691d47076b096e4502f4625fdc759c351d3e8b0a93fc26c33dd4862c2383d7620bb1704649c275da322f7 SHA512 4ed273ef8203f1b2fd90855821576523b070236911a26199eec220f1bad34f63759a32b06f11a681e532a2c793339d9e66bcb90e5cde5de02d8842a40c471a06 diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/files/gnu-efi-3.0.9-fix-clang-build.patch b/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/files/gnu-efi-3.0.9-fix-clang-build.patch deleted file mode 100644 index 0e4ec7d77b..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/files/gnu-efi-3.0.9-fix-clang-build.patch +++ /dev/null @@ -1,19 +0,0 @@ -Bug: https://bugs.gentoo.org/695612 -Upstream: https://sourceforge.net/p/gnu-efi/patches/70/ - ---- a/Make.defaults -+++ b/Make.defaults -@@ -110,10 +110,10 @@ - || ( [ $(GCCVERSION) -eq "4" ] \ - && [ $(GCCMINOR) -ge "7" ] ) ) \ - && echo 1) -- ifeq ($(GCCNEWENOUGH),1) -- CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11 -- else ifeq ($(USING_CLANG),clang) -+ ifeq ($(USING_CLANG),clang) - CPPFLAGS += -DGNU_EFI_USE_MS_ABI --std=c11 -+ else ifeq ($(GCCNEWENOUGH),1) -+ CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11 - endif - - CFLAGS += -mno-red-zone diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/files/gnu-efi-4.0.0-remove-linux-headers.patch b/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/files/gnu-efi-4.0.0-remove-linux-headers.patch deleted file mode 100644 index 858200e301..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/files/gnu-efi-4.0.0-remove-linux-headers.patch +++ /dev/null @@ -1,14 +0,0 @@ -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 - - ifneq ($(HAVE_EFI_OBJCOPY),) - ifeq ($(SYSTEM_HAS_EFI_OBJCOPY),0) diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-3.0.15.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-3.0.15.ebuild deleted file mode 100644 index 3f81e2b213..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-3.0.15.ebuild +++ /dev/null @@ -1,86 +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 ~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}"/${PN}-3.0.9-fix-clang-build.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}" - PREFIX="${EPREFIX}/usr" - LIBDIR='$(PREFIX)'/$(get_libdir) - ) - emake -j1 "${args[@]}" "$@" -} - -src_compile() { - tc-export BUILD_CC AR AS CC LD - - 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/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-3.0.17.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-3.0.17.ebuild deleted file mode 100644 index 2f32f66d45..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-3.0.17.ebuild +++ /dev/null @@ -1,87 +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 ~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}"/${PN}-3.0.9-fix-clang-build.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/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-4.0.2.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-4.0.4.ebuild similarity index 97% rename from sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-4.0.2.ebuild rename to sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-4.0.4.ebuild index f08189e0c8..208715ffce 100644 --- a/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-4.0.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-boot/gnu-efi/gnu-efi-4.0.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 2004-2025 Gentoo Authors +# Copyright 2004-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -118,7 +118,9 @@ efimake() { src_compile() { tc-export BUILD_CC AR AS CC LD OBJCOPY - if ! use custom-cflags; then + if use custom-cflags; then + LDFLAGS="$(raw-ldflags)" + else unset CFLAGS CPPFLAGS LDFLAGS fi