debuggers.hg
changeset 3041:3d470807adec
bitkeeper revision 1.1159.168.7 (419a6fbepARynjSYyfFg1S3Py1v94A)
Xen build fixes. Work with Hardened GCC.
Xen build fixes. Work with Hardened GCC.
author | kaf24@freefall.cl.cam.ac.uk |
---|---|
date | Tue Nov 16 21:23:10 2004 +0000 (2004-11-16) |
parents | adea3db0783f |
children | fa4a637449cb |
files | xen/Makefile xen/Rules.mk xen/arch/x86/Rules.mk |
line diff
1.1 --- a/xen/Makefile Mon Nov 15 20:36:28 2004 +0000 1.2 +++ b/xen/Makefile Tue Nov 16 21:23:10 2004 +0000 1.3 @@ -26,7 +26,7 @@ install: $(TARGET) 1.4 install -m0644 include/public/COPYING $(prefix)/usr/include/xen 1.5 1.6 dist: $(TARGET) 1.7 - $(MAKE) prefix=`pwd`/../install dist=yes install 1.8 + $(MAKE) prefix=`pwd`/../dist/install dist=yes install 1.9 1.10 clean: 1.11 $(MAKE) -C figlet clean
2.1 --- a/xen/Rules.mk Mon Nov 15 20:36:28 2004 +0000 2.2 +++ b/xen/Rules.mk Tue Nov 16 21:23:10 2004 +0000 2.3 @@ -39,6 +39,8 @@ ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARC 2.4 HOSTCC = gcc 2.5 HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer 2.6 2.7 +test-gcc-flag = $(shell gcc -v --help 2>&1 | grep -q " $(1) " && echo $(1)) 2.8 + 2.9 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk 2.10 2.11 ifneq ($(debug),y) 2.12 @@ -62,6 +64,8 @@ ifeq ($(trace),y) 2.13 CFLAGS += -DTRACE_BUFFER 2.14 endif 2.15 2.16 +CFLAGS := $(strip $(CFLAGS)) 2.17 + 2.18 %.o: %.c $(HDRS) Makefile 2.19 $(CC) $(CFLAGS) -c $< -o $@ 2.20
3.1 --- a/xen/arch/x86/Rules.mk Mon Nov 15 20:36:28 2004 +0000 3.2 +++ b/xen/arch/x86/Rules.mk Tue Nov 16 21:23:10 2004 +0000 3.3 @@ -14,10 +14,14 @@ else 3.4 x86_32/usercopy.o: CFLAGS += -O1 3.5 endif 3.6 3.7 - 3.8 # Prevent floating-point variables from creeping into Xen. 3.9 CFLAGS += -msoft-float 3.10 3.11 +# Disable PIE/SSP if GCC supports them. They can break us. 3.12 +CFLAGS += $(call test-gcc-flag,-nopie) 3.13 +CFLAGS += $(call test-gcc-flag,-fno-stack-protector) 3.14 +CFLAGS += $(call test-gcc-flag,-fno-stack-protector-all) 3.15 + 3.16 ifeq ($(TARGET_SUBARCH),x86_32) 3.17 CFLAGS += -m32 -march=i686 3.18 LDFLAGS := --oformat elf32-i386