ia64/xen-unstable

changeset 19030:0e448d0a41ff

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>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jan 13 08:40:42 2009 +0000 (2009-01-13)
parents 5ad9fc3c896f
children 27e9687c5b3d
files xen/Rules.mk xen/arch/ia64/Rules.mk xen/arch/x86/Rules.mk
line diff
     1.1 --- a/xen/Rules.mk	Mon Jan 12 16:39:07 2009 +0000
     1.2 +++ b/xen/Rules.mk	Tue Jan 13 08:40:42 2009 +0000
     1.3 @@ -23,9 +23,6 @@ endif
     1.4  ifeq ($(perfc_arrays),y)
     1.5  perfc := y
     1.6  endif
     1.7 -ifeq ($(frame_pointer),y)
     1.8 -CFLAGS := $(shell echo $(CFLAGS) | sed -e 's/-f[^ ]*omit-frame-pointer//g')
     1.9 -endif
    1.10  
    1.11  # Set ARCH/SUBARCH appropriately.
    1.12  override TARGET_SUBARCH  := $(XEN_TARGET_ARCH)
    1.13 @@ -64,17 +61,18 @@ AFLAGS-y                += -D__ASSEMBLY_
    1.14  
    1.15  ALL_OBJS := $(ALL_OBJS-y)
    1.16  
    1.17 -CFLAGS_tmp := $(strip $(CFLAGS) $(CFLAGS-y))
    1.18 -CFLAGS = $(CFLAGS_tmp) -MMD -MF .$(@F).d
    1.19 +# Get gcc to generate the dependencies for us.
    1.20 +CFLAGS-y += -MMD -MF .$(@F).d
    1.21 +DEPS = .*.d
    1.22 +
    1.23 +CFLAGS += $(CFLAGS-y)
    1.24  
    1.25  # Most CFLAGS are safe for assembly files:
    1.26  #  -std=gnu{89,99} gets confused by #-prefixed end-of-line comments
    1.27 -AFLAGS_tmp := $(strip $(AFLAGS) $(AFLAGS-y))
    1.28 -AFLAGS_tmp += $(patsubst -std=gnu%,,$(CFLAGS_tmp))
    1.29 -AFLAGS = $(AFLAGS_tmp) -MMD -MF .$(@F).d
    1.30 +AFLAGS += $(AFLAGS-y) $(filter-out -std=gnu%,$(CFLAGS))
    1.31  
    1.32  # LDFLAGS are only passed directly to $(LD)
    1.33 -LDFLAGS  := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT))
    1.34 +LDFLAGS += $(LDFLAGS_DIRECT)
    1.35  
    1.36  include Makefile
    1.37  
    1.38 @@ -92,8 +90,6 @@ obj-y    := $(patsubst %/,%/built-in.o,$
    1.39  
    1.40  subdir-all := $(subdir-y) $(subdir-n)
    1.41  
    1.42 -DEPS = .*.d
    1.43 -
    1.44  built_in.o: $(obj-y)
    1.45  	$(LD) $(LDFLAGS) -r -o $@ $^
    1.46  
     2.1 --- a/xen/arch/ia64/Rules.mk	Mon Jan 12 16:39:07 2009 +0000
     2.2 +++ b/xen/arch/ia64/Rules.mk	Tue Jan 13 08:40:42 2009 +0000
     2.3 @@ -72,4 +72,4 @@ ifeq ($(xen_ia64_disable_optvfault),y)
     2.4  CFLAGS += -DCONFIG_XEN_IA64_DISABLE_OPTVFAULT
     2.5  endif
     2.6  
     2.7 -LDFLAGS := -g
     2.8 +LDFLAGS = -g
     3.1 --- a/xen/arch/x86/Rules.mk	Mon Jan 12 16:39:07 2009 +0000
     3.2 +++ b/xen/arch/x86/Rules.mk	Tue Jan 13 08:40:42 2009 +0000
     3.3 @@ -45,8 +45,9 @@ ifeq ($(TARGET_SUBARCH),x86_64)
     3.4  CFLAGS += -mno-red-zone -fpic -fno-reorder-blocks
     3.5  CFLAGS += -fno-asynchronous-unwind-tables
     3.6  # -fvisibility=hidden reduces -fpic cost, if it's available
     3.7 -CFLAGS += $(call cc-option,$(CC),-fvisibility=hidden,)
     3.8 -CFLAGS := $(subst -fvisibility=hidden,-DGCC_HAS_VISIBILITY_ATTRIBUTE,$(CFLAGS))
     3.9 +ifneq ($(call cc-option,$(CC),-fvisibility=hidden,n),n)
    3.10 +CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE
    3.11 +endif
    3.12  x86_32 := n
    3.13  x86_64 := y
    3.14  endif