Makefile: Use correct objcopy binary when cross-compiling for x86_64
Use the compiler toolchain version of objcopy instead of the native one
when cross-compiling for the x86_64 architecture.
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
diff --git a/Makefile b/Makefile
index 3862112..f72f163 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@
CFLAGS :=
LD := $(CROSS_COMPILE)ld
LDFLAGS :=
+OBJCOPY := $(CROSS_COMPILE)objcopy
FIND := find
CSCOPE := cscope
@@ -480,7 +481,7 @@
x86/bios/bios.bin: x86/bios/bios.bin.elf
$(E) " OBJCOPY " $@
- $(Q) objcopy -O binary -j .text x86/bios/bios.bin.elf x86/bios/bios.bin
+ $(Q) $(OBJCOPY) -O binary -j .text x86/bios/bios.bin.elf x86/bios/bios.bin
x86/bios/bios-rom.o: x86/bios/bios-rom.S x86/bios/bios.bin x86/bios/bios-rom.h
$(E) " CC " $@