Message ID | 4B2BA2B4.3030508@codemonkey.ws |
---|---|
State | New |
Headers | show |
On 12/18/09 16:41, Anthony Liguori wrote: > I needed the following patch for this series to build: > > --- a/src/optionroms.c > +++ b/src/optionroms.c > @@ -13,6 +13,7 @@ > +#include "paravirt.h" // qemu_cfg_* > --- a/src/paravirt.h > +++ b/src/paravirt.h > +u32 qemu_cfg_read_file(QemuCfgFile *entry, void *dst, u32 maxlen); Patch is very reasonable. /me wonders how it did build for me without warning about the missing prototype ... cheers, Gerd
Gerd Hoffmann wrote: > On 12/18/09 16:41, Anthony Liguori wrote: >> I needed the following patch for this series to build: >> >> --- a/src/optionroms.c >> +++ b/src/optionroms.c >> @@ -13,6 +13,7 @@ >> +#include "paravirt.h" // qemu_cfg_* > >> --- a/src/paravirt.h >> +++ b/src/paravirt.h >> +u32 qemu_cfg_read_file(QemuCfgFile *entry, void *dst, u32 maxlen); > > Patch is very reasonable. > > /me wonders how it did build for me without warning about the missing > prototype ... I think your fw_cfg.h changes also broke the optionroms/multiboot build. Haven't debugged yet though. Regards, Anthony Liguori
On Fri, Dec 18, 2009 at 04:52:08PM +0100, Gerd Hoffmann wrote: > On 12/18/09 16:41, Anthony Liguori wrote: >> I needed the following patch for this series to build: >> >> --- a/src/optionroms.c >> +++ b/src/optionroms.c >> @@ -13,6 +13,7 @@ >> +#include "paravirt.h" // qemu_cfg_* > >> --- a/src/paravirt.h >> +++ b/src/paravirt.h >> +u32 qemu_cfg_read_file(QemuCfgFile *entry, void *dst, u32 maxlen); > > Patch is very reasonable. > > /me wonders how it did build for me without warning about the missing > prototype ... SeaBIOS tries to use -fwhole-program to optimize the build. Unfortunately, that option appears to be a bit "bleeding edge", and some gcc versions have a hard time with it. So, SeaBIOS supports two ways to build with -fwhole-program - one with "-combine", and one with a textual inclusion of all files. Unfortunately, some errors can be masked in one type of build that are exposed in the other type. The next major version of gcc should have support for "-flto". Once distros start shipping it, I think seabios should just support the new lto mechanism and the standard non-whole-program build. That should simplify these build issues. -Kevin
diff --git a/src/optionroms.c b/src/optionroms.c index c5de1ad..0be6852 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -13,6 +13,7 @@ #include "pci_regs.h" // PCI_ROM_ADDRESS #include "pci_ids.h" // PCI_CLASS_DISPLAY_VGA #include "boot.h" // IPL +#include "paravirt.h" // qemu_cfg_* /**************************************************************** diff --git a/src/paravirt.h b/src/paravirt.h index d33e10d..4cef48e 100644 --- a/src/paravirt.h +++ b/src/paravirt.h @@ -63,5 +63,6 @@ typedef struct QemuCfgFile { u16 qemu_cfg_first_file(QemuCfgFile *entry); u16 qemu_cfg_next_file(QemuCfgFile *entry); +u32 qemu_cfg_read_file(QemuCfgFile *entry, void *dst, u32 maxlen); #endif