From 1c2bf6ee5fdc25294a0f70fcb17b6045ec9c4669 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 11 Mar 2026 10:09:20 +0100 Subject: [PATCH] overlay sys-boot/shim: Fix building with binutils 2.46 Signed-off-by: Krzesimir Nowak --- .../0002-Fix-build-with-binutils-2-46.patch | 39 +++++++++++++++++++ ...him-15.8-r2.ebuild => shim-15.8-r3.ebuild} | 1 + 2 files changed, 40 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-boot/shim/files/0002-Fix-build-with-binutils-2-46.patch rename sdk_container/src/third_party/coreos-overlay/sys-boot/shim/{shim-15.8-r2.ebuild => shim-15.8-r3.ebuild} (97%) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/files/0002-Fix-build-with-binutils-2-46.patch b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/files/0002-Fix-build-with-binutils-2-46.patch new file mode 100644 index 0000000000..e02cf342cd --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/files/0002-Fix-build-with-binutils-2-46.patch @@ -0,0 +1,39 @@ +The following entry from binutils 2.46 NEWS file explains the breaking change: + +* Internal changes to plugin support, and stricter target checking may result + in some errors being exposed in user options passed to the various binutils. + For example objcopy --target=TARGET now will only work if the input file is + for TARGET whereas prior versions of objcopy accepted other target input + files and produced a TARGET output. If you do in fact want the old + behaviour the correct usage is objcopy --output-target=TARGET. + +Thus update the FORMAT variables to use --output-target instead. + +diff '--color=auto' -u -r shim-15.8/Make.defaults shim-15.8-patched/Make.defaults +--- shim-15.8/Make.defaults 2024-01-22 19:18:05.000000000 -0000 ++++ shim-15.8-patched/Make.defaults 2026-03-11 08:58:33.972284263 -0000 +@@ -159,7 +159,7 @@ + + LIB_GCC = $(shell $(CC) $(ARCH_CFLAGS) -print-libgcc-file-name) + EFI_LIBS = -lefi -lgnuefi --start-group Cryptlib/libcryptlib.a Cryptlib/OpenSSL/libopenssl.a --end-group $(LIB_GCC) +-FORMAT ?= --target efi-app-$(ARCH) ++FORMAT ?= --output-target efi-app-$(ARCH) + LOCAL_EFI_PATH = gnu-efi/$(ARCH_GNUEFI)/gnuefi + LIBDIR = gnu-efi/$(ARCH_GNUEFI)/lib + +diff '--color=auto' -u -r shim-15.8/gnu-efi/apps/Makefile shim-15.8-patched/gnu-efi/apps/Makefile +--- shim-15.8/gnu-efi/apps/Makefile 2024-01-22 19:18:05.000000000 -0000 ++++ shim-15.8-patched/gnu-efi/apps/Makefile 2026-03-11 08:59:11.613462517 -0000 +@@ -66,9 +66,9 @@ + + ifneq ($(HAVE_EFI_OBJCOPY),) + +-FORMAT := --target efi-app-$(ARCH) +-$(TARGET_BSDRIVERS): FORMAT=--target efi-bsdrv-$(ARCH) +-$(TARGET_RTDRIVERS): FORMAT=--target efi-rtdrv-$(ARCH) ++FORMAT := --output-target efi-app-$(ARCH) ++$(TARGET_BSDRIVERS): FORMAT=--output-target efi-bsdrv-$(ARCH) ++$(TARGET_RTDRIVERS): FORMAT=--output-target efi-rtdrv-$(ARCH) + + else + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/shim-15.8-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/shim-15.8-r3.ebuild similarity index 97% rename from sdk_container/src/third_party/coreos-overlay/sys-boot/shim/shim-15.8-r2.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-boot/shim/shim-15.8-r3.ebuild index 10defae63c..c2cd0941b4 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/shim-15.8-r2.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/shim-15.8-r3.ebuild @@ -25,6 +25,7 @@ DEPEND=" PATCHES=( "${FILESDIR}/0001-Fix-parallel-build-of-gnu-efi.patch" + "${FILESDIR}/0002-Fix-build-with-binutils-2-46.patch" ) src_compile() {