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

Signed-off-by: Sean Bruno <sbr...@freebsd.org>
---
 pc-bios/optionrom/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
index d88ce11..5cf7c93 100644
--- a/pc-bios/optionrom/Makefile
+++ b/pc-bios/optionrom/Makefile
@@ -28,7 +28,11 @@ endif
 CFLAGS := $(filter -O% -g%, $(CFLAGS))
 QEMU_INCLUDES += -I$(SRC_PATH)
 
+ifdef CONFIG_BSD
+Wa = -Wa 
+else
 Wa = -Wa,
+endif
 ASFLAGS += -32
 QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), $(Wa)-32)
 
@@ -44,8 +48,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)$@")
-- 
2.8.4


Reply via email to