mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86emul/test: generate non-pie executable for 64bit builds
PIE may (and commonly will) result in the binary being loaded above the 4Gb boundary, which can't work with at least the VZEROUPPER compat mode test. Add -fno-PIE and -no-pie when appropriate so that gcc won't generate a PIE executable. Reported-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
5fc07747d6
commit
e90188b981
1 file changed
+4
-2
@@ -76,7 +76,7 @@ $(addsuffix .c,$(SIMD)) $(addsuffix -avx.c,$(filter sse%,$(SIMD))):
|
||||
ln -sf simd.c $@
|
||||
|
||||
$(TARGET): x86_emulate.o test_x86_emulator.o
|
||||
$(HOSTCC) -o $@ $^
|
||||
$(HOSTCC) $(HOSTCFLAGS) -o $@ $^
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@@ -98,7 +98,9 @@ asm:
|
||||
|
||||
asm/%: asm ;
|
||||
|
||||
HOSTCFLAGS += $(CFLAGS_xeninclude) -I.
|
||||
HOSTCFLAGS-x86_64 := -fno-PIE
|
||||
$(call cc-option-add,HOSTCFLAGS-x86_64,HOSTCC,-no-pie)
|
||||
HOSTCFLAGS += $(CFLAGS_xeninclude) -I. $(HOSTCFLAGS-$(XEN_COMPILE_ARCH))
|
||||
|
||||
x86.h := asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h
|
||||
x86_emulate.h := x86_emulate.h x86_emulate/x86_emulate.h $(x86.h)
|
||||
|
||||