From: Thomas Huth <thuth@redhat.com>
Without this linker flag, the linking fails on NetBSD v10.1 with:
ld: i386 architecture of input file `multiboot.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `multiboot_dma.o' is incompatible with i386:x86-64 output
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
pc-bios/optionrom/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
index 30d07026c79..e6674a76e73 100644
--- a/pc-bios/optionrom/Makefile
+++ b/pc-bios/optionrom/Makefile
@@ -36,7 +36,7 @@ config-cc.mak: Makefile
$(call cc-option,-Wno-array-bounds)) 3> config-cc.mak
-include config-cc.mak
-override LDFLAGS = -nostdlib -Wl,--build-id=none,-T,$(SRC_DIR)/flat.lds
+override LDFLAGS = -nostdlib -Wl,--build-id=none,-T,$(SRC_DIR)/flat.lds,-m,elf_i386
pvh.img: pvh.o pvh_main.o
--
2.52.0
On 1/21/26 10:48, Thomas Huth wrote: > From: Thomas Huth <thuth@redhat.com> > > Without this linker flag, the linking fails on NetBSD v10.1 with: > > ld: i386 architecture of input file `multiboot.o' is incompatible with i386:x86-64 output > ld: i386 architecture of input file `multiboot_dma.o' is incompatible with i386:x86-64 output I'm picking this up for stable series too. Please let me know if I shouldn't. Thanks, /mjt
On 21/1/26 08:48, Thomas Huth wrote: > From: Thomas Huth <thuth@redhat.com> > > Without this linker flag, the linking fails on NetBSD v10.1 with: > > ld: i386 architecture of input file `multiboot.o' is incompatible with i386:x86-64 output > ld: i386 architecture of input file `multiboot_dma.o' is incompatible with i386:x86-64 output > > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- > pc-bios/optionrom/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
On 1/21/26 18:48, Thomas Huth wrote: > From: Thomas Huth <thuth@redhat.com> > > Without this linker flag, the linking fails on NetBSD v10.1 with: > > ld: i386 architecture of input file `multiboot.o' is incompatible with i386:x86-64 output > ld: i386 architecture of input file `multiboot_dma.o' is incompatible with i386:x86-64 output > > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- > pc-bios/optionrom/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile > index 30d07026c79..e6674a76e73 100644 > --- a/pc-bios/optionrom/Makefile > +++ b/pc-bios/optionrom/Makefile > @@ -36,7 +36,7 @@ config-cc.mak: Makefile > $(call cc-option,-Wno-array-bounds)) 3> config-cc.mak > -include config-cc.mak > > -override LDFLAGS = -nostdlib -Wl,--build-id=none,-T,$(SRC_DIR)/flat.lds > +override LDFLAGS = -nostdlib -Wl,--build-id=none,-T,$(SRC_DIR)/flat.lds,-m,elf_i386 > > pvh.img: pvh.o pvh_main.o > Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
© 2016 - 2026 Red Hat, Inc.