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-devel

[Xen-devel] [PATCH] use HOSTCC to determine HOSTCFLAGS

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] use HOSTCC to determine HOSTCFLAGS
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Wed, 14 Dec 2005 16:38:04 +0900
Delivery-date: Wed, 14 Dec 2005 07:40:09 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
Hi.

HOSTCC should be used to set HOSTCFLAGS instead of CC.
There is a case where HOSTCC doesn't accept -Wdeclaration-after-statement,
while CC does. It results in a compilation error.
This patch fixes it

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

-- 
diff -r 94cb428d363d -r 164e8408c67a Config.mk
--- a/Config.mk Mon Dec 12 15:20:51 2005 +0900
+++ b/Config.mk Mon Dec 12 17:36:35 2005 +0900
@@ -38,10 +38,10 @@
 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
 endif
 
-test-gcc-flag = $(shell $(CC) -v --help 2>&1 | grep -q " $(1) " && echo $(1))
+test-gcc-flag = $(shell $(1) -v --help 2>&1 | grep -q " $(2) " && echo $(2))
 
-HOSTCFLAGS += $(call test-gcc-flag,-Wdeclaration-after-statement)
-CFLAGS     += $(call test-gcc-flag,-Wdeclaration-after-statement)
+HOSTCFLAGS += $(call test-gcc-flag,$(HOSTCC),-Wdeclaration-after-statement)
+CFLAGS     += $(call test-gcc-flag,$(CC),-Wdeclaration-after-statement)
 
 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) 
 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))



-- 
yamahata

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

<Prev in Thread] Current Thread [Next in Thread>