[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] rombios: prevent building with PIC



On Fri, Jun 23, 2017 at 07:26:01PM +0200, Olaf Hering wrote:
> If the default compiler silently defaults to to -fPIC/-fPIE building
> rombios fails:
> 
>  ld -melf_i386 -s -r 32bitbios.o tcgbios/tcgbiosext.o util.o pmm.o -o 
> 32bitbios_all.o
>  There are undefined symbols in the BIOS:
>           U _GLOBAL_OFFSET_TABLE_
>  make[10]: *** [Makefile:26: 32bitbios_all.o] Error 11
> 
> Prevent the failure by enforcing non-PIC mode.
> 
> Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

Do you need to check if the compiler supports -fno-pic?

I know not every version of gcc support -fno-pie, but I'm not sure about
-fno-pic. In any case, there is already something in our build system to
deal with testing gcc options, which would be useful to you.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.