WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xen: Do not assign to CFLAGS/AFLAGS/LDFLA

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xen: Do not assign to CFLAGS/AFLAGS/LDFLAGS with :=.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Jan 2009 02:50:46 -0800
Delivery-date: Fri, 16 Jan 2009 02:53:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1231836042 0
# Node ID 0e448d0a41ff66288a257c3c654f4d881388264f
# Parent  5ad9fc3c896f404bb7b1e44ed5833a6ee7ea02a5
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@xxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/Rules.mk           |   18 +++++++-----------
 xen/arch/ia64/Rules.mk |    2 +-
 xen/arch/x86/Rules.mk  |    5 +++--
 3 files changed, 11 insertions(+), 14 deletions(-)

diff -r 5ad9fc3c896f -r 0e448d0a41ff xen/Rules.mk
--- a/xen/Rules.mk      Mon Jan 12 16:39:07 2009 +0000
+++ b/xen/Rules.mk      Tue Jan 13 08:40:42 2009 +0000
@@ -22,9 +22,6 @@ endif
 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.
@@ -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
 
@@ -91,8 +89,6 @@ obj-y    := $(patsubst %/,%/built-in.o,$
 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 $@ $^
diff -r 5ad9fc3c896f -r 0e448d0a41ff xen/arch/ia64/Rules.mk
--- a/xen/arch/ia64/Rules.mk    Mon Jan 12 16:39:07 2009 +0000
+++ b/xen/arch/ia64/Rules.mk    Tue Jan 13 08:40:42 2009 +0000
@@ -72,4 +72,4 @@ CFLAGS += -DCONFIG_XEN_IA64_DISABLE_OPTV
 CFLAGS += -DCONFIG_XEN_IA64_DISABLE_OPTVFAULT
 endif
 
-LDFLAGS := -g
+LDFLAGS = -g
diff -r 5ad9fc3c896f -r 0e448d0a41ff xen/arch/x86/Rules.mk
--- a/xen/arch/x86/Rules.mk     Mon Jan 12 16:39:07 2009 +0000
+++ b/xen/arch/x86/Rules.mk     Tue Jan 13 08:40:42 2009 +0000
@@ -45,8 +45,9 @@ CFLAGS += -mno-red-zone -fpic -fno-reord
 CFLAGS += -mno-red-zone -fpic -fno-reorder-blocks
 CFLAGS += -fno-asynchronous-unwind-tables
 # -fvisibility=hidden reduces -fpic cost, if it's available
-CFLAGS += $(call cc-option,$(CC),-fvisibility=hidden,)
-CFLAGS := $(subst -fvisibility=hidden,-DGCC_HAS_VISIBILITY_ATTRIBUTE,$(CFLAGS))
+ifneq ($(call cc-option,$(CC),-fvisibility=hidden,n),n)
+CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE
+endif
 x86_32 := n
 x86_64 := y
 endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xen: Do not assign to CFLAGS/AFLAGS/LDFLAGS with :=., Xen patchbot-unstable <=