Unbreak FreeBSD build after optionrom update.
PATCH v2 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.
--- pc-bios/optionrom/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+)
pc-bios/optionrom/Makefile +8 -0
@@ -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)$@")
Signature · 1 line
2.8.4
[Qemu-devel] R: [PATCH v2] Unbreak FreeBSD build after optionrom update.
Quoted 5 lines
Update the build flags appropriately for FreeBSD and add the correct
LD_EMULATIONtype for the FreeBSD build case.Signed-off-by Sean Bruno <[email protected]>
I posted the right fix a couple days ago, but didn't manage to send a pull request before leaving and I am on mobile until next Monday.
Search the archive for cc-c-option to get the right fix.
Also, the commit message for a build fix patch really should include the error message, so please do that even if your v3 only includes the change to the emulation name.
Thanks,
Paolo
Quoted 36 lines
--- pc-bios/optionrom/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+)pc-bios/optionrom/Makefile +8
-0@@ -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)$@")Signature · 1 line
2.8.4
Re: [Qemu-devel] R: [PATCH v2] Unbreak FreeBSD build after optionrom update.
Quoted 8 lines · Paolo Bonzini
Quoted 5 lines
Update the build flags appropriately for FreeBSD and add the correct
LD_EMULATIONtype for the FreeBSD build case.Signed-off-by Sean Bruno <[email protected]>I posted the right fix a couple days ago, but didn't manage to send a pull request before leaving and I am on mobile until next Monday.
Quoted 8 lines
Search the archive for cc-c-option to get the right fix.
Also, the commit message for a build fix patch really should include the error message, so please do that even if your v3 only includes the change to the emulation name.
Thanks,
Paolo
Paolo:
Thanks for the pointer to the right fix. Confirmed that your changes DTRT for FreeBSD.
I still need the LD_EMULATION addition, which I have sent to the list as a separate patch for review.
sean
Re: [Qemu-devel] R: [PATCH v2] Unbreak FreeBSD build after optionrom update.
Quoted 6 lines · Sean Bruno
Thanks for the pointer to the right fix. Confirmed that your changes DTRT for FreeBSD.
I still need the
LD_EMULATIONaddition, which I have sent to the list as a separate patch for review.
Great, thanks!
Paolo
Re: [Qemu-devel] R: [PATCH v2] Unbreak FreeBSD build after optionrom update.
Quoted 7 lines · Paolo Bonzini
Quoted 4 lines · Sean Bruno
Thanks for the pointer to the right fix. Confirmed that your changes DTRT for FreeBSD.
Quoted 6 lines
Quoted 2 lines
I still need the
LD_EMULATIONaddition, which I have sent to the list as a separate patch for review.Great, thanks!
Paolo
This breaks the build on OpenBSD..
ld: unrecognised emulation mode: elf_i386_fbsd Supported emulations: elf_x86_64_obsd elf_i386_obsd elf_i386 gmake[1]: *** [Makefile:55: multiboot.img] Error 1
Re: [Qemu-devel] R: [PATCH v2] Unbreak FreeBSD build after optionrom update.
Quoted 5 lines · Brad Smith
This breaks the build on OpenBSD..
ld: unrecognised emulation mode:
elf_i386_fbsdSupported emulations:elf_x86_64_obsdelf_i386_obsdelf_i386gmake[1]: *** [Makefile:55: multiboot.img] Error 1
Sorry about that; I've just sent out a patch which I hope will fix this, but which will need testing on the BSDs.
thanks
-- PMM
Re: [Qemu-devel] R: [PATCH v2] Unbreak FreeBSD build after optionrom update.
In reply to Brad SmithQuoted 5 lines · Brad Smith
This breaks the build on OpenBSD..
ld: unrecognised emulation mode:
elf_i386_fbsdSupported emulations:elf_x86_64_obsdelf_i386_obsdelf_i386gmake[1]: *** [Makefile:55: multiboot.img] Error 1
I'm looking at adding some BSD build tests to my set,
using the VMs in the GCC compile farm. However for
OpenBSD the compile farm has an OpenBSD 5.0 which fails configure:
ERROR: Your compiler does not support the __thread specifier for
Thread-Local Storage (TLS). Please upgrade to a version that does.
Is this just too old an OpenBSD?
thanks
-- PMM