From: Keith Owens <kaos@ocs.com.au>
To: Mikael Pettersson <mikpe@csd.uu.se>,
Russell King <rmk+lkml@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, sam@ravnborg.org
Subject: Re: [patch 2.6.12] Add -Wno-pointer-sign to HOSTCFLAGS
Date: Sun, 19 Jun 2005 20:32:24 +1000 [thread overview]
Message-ID: <11208.1119177144@ocs3.ocs.com.au> (raw)
In-Reply-To: Your message of "Sun, 19 Jun 2005 11:23:37 +0200." <200506190923.j5J9Nbq0011676@harpo.it.uu.se>
On Sun, 19 Jun 2005 11:23:37 +0200 (MEST),
Mikael Pettersson <mikpe@csd.uu.se> 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 <kaos@ocs.com.au>
>>
>>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.
The entire kernel, except the scripts directory, is already being
compiled with -Wno-pointer-sign, and has done since 2.6.12-rc1. This
patch makes scripts consistent with the rest of the kernel. The
-Wno-pointer-sign option was added to gcc 4 just for this problem.
If you feel that the code is bogus then turn off the option in your own
tree. Be prepared for thousands of lines of warnings.
On Sun, 19 Jun 2005 10:58:33 +0100,
Russell King <rmk+lkml@arm.linux.org.uk> wrote:
>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.
Good point. New patch.
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. HOSTCFLAGS change from '=' to ':=' to avoid
recursion problems.
Signed-off-by: Keith Owens <kaos@ocs.com.au>
Index: 2.6.12/Makefile
===================================================================
--- 2.6.12.orig/Makefile 2005-06-19 20:28:20.504999656 +1000
+++ 2.6.12/Makefile 2005-06-19 20:30:14.157877993 +1000
@@ -203,7 +203,11 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
HOSTCC = gcc
HOSTCXX = g++
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+# disable pointer signedness warnings in gcc 4.0
+hostcc-option = $(shell if $(HOSTCC) $(HOSTCFLAGS) $(1) -S -o /dev/null -xc /dev/null \
+ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
+HOSTCFLAGS += $(call hostcc-option,-Wno-pointer-sign,)
HOSTCXXFLAGS = -O2
# Decide whether to build built-in, modular, or both.
next prev parent reply other threads:[~2005-06-19 10:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-19 9:23 [patch 2.6.12] Add -Wno-pointer-sign to HOSTCFLAGS Mikael Pettersson
2005-06-19 9:58 ` Russell King
2005-06-19 10:32 ` Keith Owens [this message]
2005-07-03 19:22 ` Sam Ravnborg
-- strict thread matches above, loose matches on Subject: below --
2005-06-19 1:50 Keith Owens
2005-06-20 2:02 ` Jeff Garzik
2005-07-03 19:26 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11208.1119177144@ocs3.ocs.com.au \
--to=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox