Isaku Yamahata
2005-Dec-14 07:38 UTC
[Xen-devel] [PATCH] use HOSTCC to determine HOSTCFLAGS
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@valinux.co.jp> -- 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@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2005-Dec-14 12:22 UTC
Re: [Xen-devel] [PATCH] use HOSTCC to determine HOSTCFLAGS
On Wed, Dec 14, 2005 at 04:38:04PM +0900, Isaku Yamahata wrote:> 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@valinux.co.jp>Applied, thanks. Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Apparently Analagous Threads
- [PATCH] Use -Werror in HOSTCFLAGS; make xen/tools use HOSTCFLAGS; fix warnings
- [PATCH V9 1/9] vhost: refine vhost and vringh kconfig
- [PATCH V9 1/9] vhost: refine vhost and vringh kconfig
- [PATCH V9 1/9] vhost: refine vhost and vringh kconfig
- [PATCH V9 1/9] vhost: refine vhost and vringh kconfig