]> xenbits.xensource.com Git - xen.git/commitdiff
rombios: prevent building with PIC/PIE
authorOlaf Hering <olaf@aepfle.de>
Mon, 28 Aug 2017 09:46:21 +0000 (11:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 28 Aug 2017 09:46:21 +0000 (11:46 +0200)
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/PIE mode.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 672949d6c61d9cba01c5b414eed9d522082f04d3
master date: 2017-06-26 14:32:46 +0100

tools/firmware/rombios/32bit/Makefile
tools/firmware/rombios/32bit/tcgbios/Makefile

index b0583c93dfd67f6daa2e6b16d78f0810f6497a70..28c15444aef5cd7824a44a782db849a2c1b1e71f 100644 (file)
@@ -4,6 +4,8 @@ include $(XEN_ROOT)/tools/firmware/Rules.mk
 TARGET = 32bitbios_flat.h
 
 CFLAGS += $(CFLAGS_xeninclude) -I.. -I../../../libacpi
+$(call cc-option-add,CFLAGS,CC,-fno-pic)
+$(call cc-option-add,CFLAGS,CC,-fno-PIE)
 
 SUBDIRS = tcgbios
 
index f87d13020ff370b6e0b75743c345f79e4690a89d..5cff4efc60e5fecc19db7ca9b5e3ef55907ef081 100644 (file)
@@ -4,6 +4,8 @@ include $(XEN_ROOT)/tools/firmware/Rules.mk
 TARGET  = tcgbiosext.o
 
 CFLAGS += $(CFLAGS_xeninclude) -I.. -I../.. -I../../../../libacpi
+$(call cc-option-add,CFLAGS,CC,-fno-pic)
+$(call cc-option-add,CFLAGS,CC,-fno-PIE)
 
 .PHONY: all
 all: $(TARGET)