diff options
author | kaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk> | 2004-11-16 21:23:10 +0000 |
---|---|---|
committer | kaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk> | 2004-11-16 21:23:10 +0000 |
commit | 830049095a9a5d7aed90c054205b975faa751732 (patch) | |
tree | 7453974305117539362fa8bb4100b6b1f231aa35 | |
parent | 0182092bce65369d4ae079d71b4d4a7143af68d0 (diff) | |
download | xen-830049095a9a5d7aed90c054205b975faa751732.tar.gz xen-830049095a9a5d7aed90c054205b975faa751732.tar.bz2 xen-830049095a9a5d7aed90c054205b975faa751732.zip |
bitkeeper revision 1.1159.168.7 (419a6fbepARynjSYyfFg1S3Py1v94A)
Xen build fixes. Work with Hardened GCC.
-rw-r--r-- | xen/Makefile | 2 | ||||
-rw-r--r-- | xen/Rules.mk | 4 | ||||
-rw-r--r-- | xen/arch/x86/Rules.mk | 6 |
3 files changed, 10 insertions, 2 deletions
diff --git a/xen/Makefile b/xen/Makefile index 2536492268..da36a2010d 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -26,7 +26,7 @@ install: $(TARGET) install -m0644 include/public/COPYING $(prefix)/usr/include/xen dist: $(TARGET) - $(MAKE) prefix=`pwd`/../install dist=yes install + $(MAKE) prefix=`pwd`/../dist/install dist=yes install clean: $(MAKE) -C figlet clean diff --git a/xen/Rules.mk b/xen/Rules.mk index ecb20cb35a..63c3a51784 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -39,6 +39,8 @@ ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o HOSTCC = gcc HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer +test-gcc-flag = $(shell gcc -v --help 2>&1 | grep -q " $(1) " && echo $(1)) + include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk ifneq ($(debug),y) @@ -62,6 +64,8 @@ ifeq ($(trace),y) CFLAGS += -DTRACE_BUFFER endif +CFLAGS := $(strip $(CFLAGS)) + %.o: %.c $(HDRS) Makefile $(CC) $(CFLAGS) -c $< -o $@ diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index fd4577f48c..bceb1982f4 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -14,10 +14,14 @@ else x86_32/usercopy.o: CFLAGS += -O1 endif - # Prevent floating-point variables from creeping into Xen. CFLAGS += -msoft-float +# Disable PIE/SSP if GCC supports them. They can break us. +CFLAGS += $(call test-gcc-flag,-nopie) +CFLAGS += $(call test-gcc-flag,-fno-stack-protector) +CFLAGS += $(call test-gcc-flag,-fno-stack-protector-all) + ifeq ($(TARGET_SUBARCH),x86_32) CFLAGS += -m32 -march=i686 LDFLAGS := --oformat elf32-i386 |