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] Add -Wdeclaration-after-statement to CFLAGS only if the

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Add -Wdeclaration-after-statement to CFLAGS only if the
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Nov 2005 11:56:06 +0000
Delivery-date: Wed, 23 Nov 2005 11:56:18 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID b6ebabe4658a0c08e17853431d1c0eba13664d6e
# Parent  393256b2ead0c883e2095479e1c66d2e34d18a10
Add -Wdeclaration-after-statement to CFLAGS only if the
compiler supports it. Move test-gcc-flag function to
Config.mk where it can be used by any component of the
build.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 393256b2ead0 -r b6ebabe4658a Config.mk
--- a/Config.mk Tue Nov 22 18:10:50 2005
+++ b/Config.mk Wed Nov 23 10:15:18 2005
@@ -8,7 +8,6 @@
 # Tools to run on system hosting the build
 HOSTCC     = gcc
 HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
-HOSTCFLAGS += -Wdeclaration-after-statement
 
 AS         = $(CROSS_COMPILE)as
 LD         = $(CROSS_COMPILE)ld
@@ -39,7 +38,10 @@
 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
 endif
 
-CFLAGS += -Wdeclaration-after-statement 
+test-gcc-flag = $(shell $(CC) -v --help 2>&1 | grep -q " $(1) " && echo $(1))
+
+HOSTCFLAGS += $(call test-gcc-flag,-Wdeclaration-after-statement)
+CFLAGS     += $(call test-gcc-flag,-Wdeclaration-after-statement)
 
 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) 
 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
diff -r 393256b2ead0 -r b6ebabe4658a xen/Rules.mk
--- a/xen/Rules.mk      Tue Nov 22 18:10:50 2005
+++ b/xen/Rules.mk      Wed Nov 23 10:15:18 2005
@@ -43,8 +43,6 @@
 endif
 ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
 
-test-gcc-flag = $(shell $(CC) -v --help 2>&1 | grep -q " $(1) " && echo $(1))
-
 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
 
 ifneq ($(debug),y)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Add -Wdeclaration-after-statement to CFLAGS only if the, Xen patchbot -unstable <=