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

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



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>
---

build tested with staging-4.9.

PIE is the default now in openSUSE Tumbleweed:
https://lists.opensuse.org/opensuse-factory/2017-06/msg00403.html

 tools/firmware/rombios/32bit/Makefile         | 2 +-
 tools/firmware/rombios/32bit/tcgbios/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/firmware/rombios/32bit/Makefile 
b/tools/firmware/rombios/32bit/Makefile
index b0583c93df..97657ae7b1 100644
--- a/tools/firmware/rombios/32bit/Makefile
+++ b/tools/firmware/rombios/32bit/Makefile
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 TARGET = 32bitbios_flat.h
 
-CFLAGS += $(CFLAGS_xeninclude) -I.. -I../../../libacpi
+CFLAGS += $(CFLAGS_xeninclude) -I.. -I../../../libacpi -fno-pic
 
 SUBDIRS = tcgbios
 
diff --git a/tools/firmware/rombios/32bit/tcgbios/Makefile 
b/tools/firmware/rombios/32bit/tcgbios/Makefile
index f87d13020f..2e3729910f 100644
--- a/tools/firmware/rombios/32bit/tcgbios/Makefile
+++ b/tools/firmware/rombios/32bit/tcgbios/Makefile
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 TARGET  = tcgbiosext.o
 
-CFLAGS += $(CFLAGS_xeninclude) -I.. -I../.. -I../../../../libacpi
+CFLAGS += $(CFLAGS_xeninclude) -I.. -I../.. -I../../../../libacpi -fno-pic
 
 .PHONY: all
 all: $(TARGET)

_______________________________________________
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®.