bitkeeper revision 1.1159.170.21 (41978006yk1bg04SJNSN2JWccT5adA)

Disable PIE/SSP features when building Xen, if GCC supports them.
This commit is contained in:
kaf24@freefall.cl.cam.ac.uk committed 2004-11-14 15:55:50 +00:00
1 parent adafcbebd2
commit f8beb54e24
2 files changed
+9 -1

No files matched your search

+4
View File
@@ -39,6 +39,8 @@ ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
HOSTCC = gcc HOSTCC = gcc
HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer 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 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
ifneq ($(debug),y) ifneq ($(debug),y)
@@ -62,6 +64,8 @@ ifeq ($(trace),y)
CFLAGS += -DTRACE_BUFFER CFLAGS += -DTRACE_BUFFER
endif endif
CFLAGS := $(strip $(CFLAGS))
%.o: %.c $(HDRS) Makefile %.o: %.c $(HDRS) Makefile
$(CC) $(CFLAGS) -c $< -o $@ $(CC) $(CFLAGS) -c $< -o $@
+5 -1
View File
@@ -14,10 +14,14 @@ else
x86_32/usercopy.o: CFLAGS += -O1 x86_32/usercopy.o: CFLAGS += -O1
endif endif
# Prevent floating-point variables from creeping into Xen. # Prevent floating-point variables from creeping into Xen.
CFLAGS += -msoft-float 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) ifeq ($(TARGET_SUBARCH),x86_32)
CFLAGS += -m32 -march=i686 CFLAGS += -m32 -march=i686
LDFLAGS := --oformat elf32-i386 LDFLAGS := --oformat elf32-i386
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.