Message ID | 20160725190842.2348-1-sbruno@freebsd.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
> Update the build flags appropriately for FreeBSD and add the correct > LD_EMULATION type for the FreeBSD build case. > > Signed-off-by: Sean Bruno <sbruno@freebsd.org> 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 > --- > 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 >
On 07/26/16 03:32, Paolo Bonzini wrote: > >> Update the build flags appropriately for FreeBSD and add the correct >> LD_EMULATION type for the FreeBSD build case. >> >> Signed-off-by: Sean Bruno <sbruno@freebsd.org> > > 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 > 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
On 26/07/2016 23:07, Sean Bruno wrote: > > 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. Great, thanks! Paolo
On 08/01/16 06:47, Paolo Bonzini wrote: > > > On 26/07/2016 23:07, Sean Bruno wrote: >> >> 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. > > 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
On 6 August 2016 at 21:59, Brad Smith <brad@comstyle.com> wrote: > 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 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
On 6 August 2016 at 21:59, Brad Smith <brad@comstyle.com> wrote: > 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 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
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)$@")
Update the build flags appropriately for FreeBSD and add the correct LD_EMULATION type for the FreeBSD build case. Signed-off-by: Sean Bruno <sbruno@freebsd.org> --- pc-bios/optionrom/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+)