[PATCH] Adapt to objcopy stricter target checking

0 views
Skip to first unread message

Quirin Gylstorff

unread,
Jan 7, 2026, 2:52:46 AMJan 7
to efibootg...@googlegroups.com
From: Quirin Gylstorff <quirin.g...@siemens.com>

This fixes an build error due to:

* 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.

See also Debian bug #1122406.

Signed-off-by: Quirin Gylstorff <quirin.g...@siemens.com>
---
Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c7aed67..bfe5753 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -299,13 +299,13 @@ efi_ldflags = \
$(GNUEFI_LIB_DIR)/crt0-efi-$(ARCH).o

if ARCH_IS_X86
-objcopy_format = --target=efi-app-$(ARCH)
+objcopy_format = --output-target=efi-app-$(ARCH)
else
if OBJCOPY_USE_BINARY_COPY
objcopy_format = -O binary
efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
else
-objcopy_format = --target=efi-app-$(ARCH)
+objcopy_format = --output-target=efi-app-$(ARCH)
endif
endif

--
2.51.2

Jan Kiszka

unread,
Jan 7, 2026, 4:06:49 AMJan 7
to Quirin Gylstorff, efibootg...@googlegroups.com
Is this backward compatible with older binutils versions?

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center

Quirin Gylstorff

unread,
Jan 7, 2026, 4:40:34 AMJan 7
to Jan Kiszka, efibootg...@googlegroups.com
I check the man page for stretch
https://manpages.debian.org/stretch/binutils/objcopy.1.en.html.

Which is the oldest supported version?

Quirin>
> Jan
>

Jan Kiszka

unread,
Jan 8, 2026, 1:23:27 AMJan 8
to Quirin Gylstorff, efibootg...@googlegroups.com
We backport down to buster. Also makes this indeed way more sense.

Thanks, applied.
Reply all
Reply to author
Forward
0 new messages