aboutsummaryrefslogtreecommitdiffstats
path: root/xen/Rules.mk
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-01-13 08:40:42 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-01-13 08:40:42 +0000
commite2869f9f1c70a6acfe35c16e7e0bd75e2dd93971 (patch)
treed8e8733ae558b056df9a195ce573e278542ddfe4 /xen/Rules.mk
parentbd3358a451b0580c96915683befdf023deb1ba82 (diff)
downloadxen-e2869f9f1c70a6acfe35c16e7e0bd75e2dd93971.tar.gz
xen-e2869f9f1c70a6acfe35c16e7e0bd75e2dd93971.tar.bz2
xen-e2869f9f1c70a6acfe35c16e7e0bd75e2dd93971.zip
xen: Do not assign to CFLAGS/AFLAGS/LDFLAGS with :=.
It's not necessary and prevents using rule patterns in these variables. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/Rules.mk')
-rw-r--r--xen/Rules.mk18
1 files changed, 7 insertions, 11 deletions
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 37da124f3d..3ee2f08593 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -23,9 +23,6 @@ endif
ifeq ($(perfc_arrays),y)
perfc := y
endif
-ifeq ($(frame_pointer),y)
-CFLAGS := $(shell echo $(CFLAGS) | sed -e 's/-f[^ ]*omit-frame-pointer//g')
-endif
# Set ARCH/SUBARCH appropriately.
override TARGET_SUBARCH := $(XEN_TARGET_ARCH)
@@ -64,17 +61,18 @@ AFLAGS-y += -D__ASSEMBLY__
ALL_OBJS := $(ALL_OBJS-y)
-CFLAGS_tmp := $(strip $(CFLAGS) $(CFLAGS-y))
-CFLAGS = $(CFLAGS_tmp) -MMD -MF .$(@F).d
+# Get gcc to generate the dependencies for us.
+CFLAGS-y += -MMD -MF .$(@F).d
+DEPS = .*.d
+
+CFLAGS += $(CFLAGS-y)
# Most CFLAGS are safe for assembly files:
# -std=gnu{89,99} gets confused by #-prefixed end-of-line comments
-AFLAGS_tmp := $(strip $(AFLAGS) $(AFLAGS-y))
-AFLAGS_tmp += $(patsubst -std=gnu%,,$(CFLAGS_tmp))
-AFLAGS = $(AFLAGS_tmp) -MMD -MF .$(@F).d
+AFLAGS += $(AFLAGS-y) $(filter-out -std=gnu%,$(CFLAGS))
# LDFLAGS are only passed directly to $(LD)
-LDFLAGS := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT))
+LDFLAGS += $(LDFLAGS_DIRECT)
include Makefile
@@ -92,8 +90,6 @@ obj-y := $(patsubst %/,%/built-in.o,$(obj-y))
subdir-all := $(subdir-y) $(subdir-n)
-DEPS = .*.d
-
built_in.o: $(obj-y)
$(LD) $(LDFLAGS) -r -o $@ $^