Fix tools Makefiles to respect CFLAGS. Disable stack-smash

protection when building vmxassist/hvmloader.

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-02-28 11:41:54 +01:00
1 parent efc061e453
commit dfd53f76ba
6 files changed
+26 -18

No files matched your search

+7 -3
View File
@@ -19,7 +19,7 @@
#
XEN_ROOT = ../../..
include $(XEN_ROOT)/tools/Rules.mk
include $(XEN_ROOT)/Config.mk
# The HVM loader is started in 32-bit mode at the address below:
LOADADDR = 0x100000
@@ -29,9 +29,13 @@ XENINC =-I$(XEN_ROOT)/tools/libxc
OBJECTS = hvmloader.o acpi_madt.o
CC = gcc
# Disable PIE/SSP if GCC supports them. They can break us.
CFLAGS += $(call test-gcc-flag,$(CC),-nopie)
CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector)
CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector-all)
OBJCOPY = objcopy
CFLAGS = $(DEFINES) -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float
CFLAGS += $(DEFINES) -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float
CFLAGS += -m32 -march=i686
LDFLAGS = -m32 -nostdlib -Wl,-N -Wl,-Ttext -Wl,$(LOADADDR)
-2
View File
@@ -1,6 +1,4 @@
CC = gcc
CFLAGS = -g -O2 -Wall -Wstrict-prototypes
LDFLAGS =
GCC = gcc
BCC = bcc
+7 -4
View File
@@ -19,7 +19,7 @@
#
XEN_ROOT = ../../..
include $(XEN_ROOT)/tools/Rules.mk
include $(XEN_ROOT)/Config.mk
# The emulator code lives in ROM space
TEXTADDR=0x000D0000
@@ -27,11 +27,14 @@ TEXTADDR=0x000D0000
DEFINES=-DDEBUG -DTEXTADDR=$(TEXTADDR)
XENINC=-I$(XEN_ROOT)/tools/libxc
LD = ld
CC = gcc
# Disable PIE/SSP if GCC supports them. They can break us.
CFLAGS += $(call test-gcc-flag,$(CC),-nopie)
CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector)
CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector-all)
CPP = cpp -P
OBJCOPY = objcopy -p -O binary -R .note -R .comment -R .bss -S --gap-fill=0
CFLAGS = $(DEFINES) -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float
CFLAGS += $(DEFINES) -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float
CFLAGS += -m32 -march=i686
LDFLAGS = -m elf_i386
+4 -1
View File
@@ -1,6 +1,9 @@
XEN_ROOT=../..
include $(XEN_ROOT)/tools/Rules.mk
-include config-host.mak
CFLAGS=-Wall -O2 -g -fno-strict-aliasing
CFLAGS+=-Wall -O2 -g -fno-strict-aliasing
ifdef CONFIG_DARWIN
CFLAGS+= -mdynamic-no-pic
endif
+4 -3
View File
@@ -1,8 +1,9 @@
XEN_ROOT=../../..
include $(XEN_ROOT)/tools/Rules.mk
include config.mak
override TARGET_ARCH=i386
XEN_ROOT=../../..
include $(XEN_ROOT)/tools/Rules.mk
INSTALL_DIR := $(DESTDIR)/usr/$(LIBDIR)/xen/bin
TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH)
VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
@@ -12,7 +13,7 @@ ifdef CONFIG_USER_ONLY
VPATH+=:$(SRC_PATH)/linux-user
DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
endif
CFLAGS=-Wall -O2 -g -fno-strict-aliasing
CFLAGS+=-Wall -O2 -g -fno-strict-aliasing
LDFLAGS=-g
LIBS=
HELPER_CFLAGS=$(CFLAGS)
+4 -5
View File
@@ -4,13 +4,12 @@ include $(XEN_ROOT)/tools/Rules.mk
TARGET := test_x86_emulator
CC := gcc
CFLAGS := -O2 -Wall -Werror -D__TEST_HARNESS__
HOSTCFLAGS += -D__TEST_HARNESS__
all: $(TARGET)
$(TARGET): x86_emulate.o test_x86_emulator.o
$(CC) -o $@ $^
$(HOSTCC) -o $@ $^
clean:
rm -rf $(TARGET) *.o *~ core
@@ -18,7 +17,7 @@ clean:
install:
x86_emulate.o: $(XEN_ROOT)/xen/arch/x86/x86_emulate.c
$(CC) $(CFLAGS) -I$(XEN_ROOT)/xen/include -c -o $@ $<
$(HOSTCC) $(HOSTCFLAGS) -I$(XEN_ROOT)/xen/include -c -o $@ $<
%.o: %.c
$(CC) $(CFLAGS) -I$(XEN_ROOT)/xen/include -c -o $@ $<
$(HOSTCC) $(HOSTCFLAGS) -I$(XEN_ROOT)/xen/include -c -o $@ $<
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.