summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHeinrich Schuchardt <[email protected]>2025-12-08 21:47:38 +0100
committerTom Rini <[email protected]>2025-12-10 09:06:13 -0600
commit7da7ca7cf50f4996493b99198e939726e721906d (patch)
treebcd46b14c46161807bf3eec1a63dc31123ad6dd0 /arch
parentfbfaf5f63e97a11cd01a8761e47f4c23915f89f6 (diff)
Makefile: use --output-target instead of --target
The objcopy man-page teaches: --target=bfdname Use bfdname as the object format for both the input and the output file This implies for --target=efi-app-x86_64 that the input file would have to be an EFI app. Objcopy in binutils 2.45 checks this more strictly than previous versions and refuses to accept an ELF file as input with --target=efi-app-x86_64. Replace --target by --output-target for building sandbox and x86 EFI binaries. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'arch')
-rw-r--r--arch/sandbox/config.mk4
-rw-r--r--arch/x86/config.mk6
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index 9a61e803a57..275661a1f3a 100644
--- a/arch/sandbox/config.mk
+++ b/arch/sandbox/config.mk
@@ -50,10 +50,10 @@ cmd_u-boot-spl = (cd $(obj) && \
ifeq ($(HOST_ARCH),$(HOST_ARCH_X86_64))
EFI_LDS := ${SRCDIR}/../../../arch/x86/lib/elf_x86_64_efi.lds
-EFI_TARGET := --target=efi-app-x86_64
+EFI_TARGET := --output-target=efi-app-x86_64
else ifeq ($(HOST_ARCH),$(HOST_ARCH_X86))
EFI_LDS := ${SRCDIR}/../../../arch/x86/lib/elf_ia32_efi.lds
-EFI_TARGET := --target=efi-app-ia32
+EFI_TARGET := --output-target=efi-app-ia32
else ifeq ($(HOST_ARCH),$(HOST_ARCH_AARCH64))
EFI_LDS := ${SRCDIR}/../../../arch/arm/lib/elf_aarch64_efi.lds
OBJCOPYFLAGS += -j .text -j .secure_text -j .secure_data -j .rodata -j .data \
diff --git a/arch/x86/config.mk b/arch/x86/config.mk
index 6d4839dfb38..c2bb5549b7c 100644
--- a/arch/x86/config.mk
+++ b/arch/x86/config.mk
@@ -69,7 +69,7 @@ endif
LDSCRIPT_EFI := $(srctree)/arch/x86/lib/elf_$(EFIARCH)_efi.lds
EFISTUB := crt0_$(EFIARCH)_efi.o reloc_$(EFIARCH)_efi.o
-OBJCOPYFLAGS_EFI += --target=efi-app-$(EFIARCH)
+OBJCOPYFLAGS_EFI += --output-target=efi-app-$(EFIARCH)
CPPFLAGS_REMOVE_crt0-efi-$(EFIARCH).o += $(CFLAGS_NON_EFI)
CPPFLAGS_crt0-efi-$(EFIARCH).o += $(CFLAGS_EFI)
@@ -127,7 +127,7 @@ endif
endif
ifdef CONFIG_X86_64
-EFI_TARGET := --target=efi-app-x86_64
+EFI_TARGET := --output-target=efi-app-x86_64
else
-EFI_TARGET := --target=efi-app-ia32
+EFI_TARGET := --output-target=efi-app-ia32
endif