From 49d3f1381d5c01897de6d3ee91492171ea000849 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 21 Jan 2026 08:48:19 +0100 Subject: [PATCH] pc-bios/optionrom: Use 32-bit linker emulation for the optionroms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth Message-ID: <20260121074819.29396-1-thuth@redhat.com> (cherry picked from commit e4f1a9b1dacb4d02500629056551b1db2985429c) Signed-off-by: Michael Tokarev --- 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 30d07026c7..e6674a76e7 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