On Mon, 25 Nov 2019 10:30:18 +0000 Alexandru Elisei <alexandru.elisei@xxxxxxx> wrote: > Use the compiler toolchain version of objcopy instead of the native one > when cross-compiling for the x86_64 architecture. Indeed, confirmed to fix aarch64->x86_64 cross builds (that's a thing!). > Signed-off-by: Alexandru Elisei <alexandru.elisei@xxxxxxx> Reviewed-by: Andre Przywara <andre.przywara@xxxxxxx> Tested-by: Andre Przywara <andre.przywara@xxxxxxx> Cheers, Andre > --- > Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index b76d844f2e01..6d6880dd4f8a 100644 > --- a/Makefile > +++ b/Makefile > @@ -22,6 +22,7 @@ CC := $(CROSS_COMPILE)gcc > CFLAGS := > LD := $(CROSS_COMPILE)ld > LDFLAGS := > +OBJCOPY := $(CROSS_COMPILE)objcopy > > FIND := find > CSCOPE := cscope > @@ -479,7 +480,7 @@ x86/bios/bios.bin.elf: x86/bios/entry.S x86/bios/e820.c x86/bios/int10.c x86/bio > > 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 " $@