Skip to contentSkip to conversation

Unbreak FreeBSD build after optionrom update.

PATCH Applied Sean Bruno 2 participants 2 messages Jul 26, 2016 – Jul 29, 2016

lore
Share & tools
lore

Sean Bruno

author
#0 lore raw

PATCH 1/1 Unbreak FreeBSD build after optionrom update.

Update the build flags appropriately for FreeBSD and add the correct LD_EMULATION type for the FreeBSD build case.

Fixes FreeBSD build error:

	ld: unrecognised emulation mode: elf_i386
	Supported emulations: elf_x86_64_fbsd elf_i386_fbsd
	gmake[1]: *** [Makefile:51: linuxboot_dma.img] Error 1
	gmake: *** [Makefile:229: romsubdir-optionrom] Error 2
---
 pc-bios/optionrom/Makefile | 4 ++++
 1 file changed, 4 insertions(+)
pc-bios/optionrom/Makefile +4 -0
index d88ce11..8c8d7cd 100644
@@ -44,8 +44,12 @@ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
 ifdef CONFIG_WIN32
 LD_EMULATION = i386pe
 else
+ifdef CONFIG_BSD
+LD_EMULATION = elf_i386_fbsd
+else
 LD_EMULATION = elf_i386
 endif
+endif
 
 %.img: %.o
 	$(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_EMULATION) -Ttext 0 -e _start -s -o $@ $<,"  Building $(TARGET_DIR)$@")
Signature · 1 line
2.8.4
#1 lore raw
Quoted 11 lines · Sean Bruno

Update the build flags appropriately for FreeBSD and add the correct LD_EMULATION type for the FreeBSD build case.

Fixes FreeBSD build error:
ld: unrecognised emulation mode: elf_i386 Supported emulations: elf_x86_64_fbsd elf_i386_fbsd gmake[1]: *** [Makefile:51: linuxboot_dma.img] Error 1
gmake: *** [Makefile:229: romsubdir-optionrom] Error 2

---

Applied, thanks.

-- PMM