Re: [patch 2.6.12] Add -Wno-pointer-sign to HOSTCFLAGS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 19, 2005 at 11:23:37AM +0200, Mikael Pettersson wrote:
> On Sun, 19 Jun 2005 11:50:03 +1000, Keith Owens wrote:
> >Compiling 2.6.12 with gcc 4.0.0 (FC4) gets lots of warnings for the
> >programs in the scripts directory.  Add -Wno-pointer-sign to HOSTCFLAGS
> >to suppress them.
> >
> >Signed-off-by: Keith Owens <[email protected]>
> >
> >Index: 2.6.12/Makefile
> >===================================================================
> >--- 2.6.12.orig/Makefile	2005-06-18 15:21:18.000000000 +1000
> >+++ 2.6.12/Makefile	2005-06-19 11:43:15.876218980 +1000
> >@@ -204,6 +204,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
> > HOSTCC  	= gcc
> > HOSTCXX  	= g++
> > HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
> >+# disable pointer signedness warnings in gcc 4.0
> >+HOSTCFLAGS += $(call cc-option,-Wno-pointer-sign,)
> > HOSTCXXFLAGS	= -O2
> 
> Please don't. Bogus code should be fixed, not hidden.

cc-option checks to see if the flag is supported by $(CC) which could
be a completely different compiler from $(HOSTCC).  Hence the above
can incorrectly supply/fail to supply the argument.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux