From: Sam Ravnborg <sam@ravnborg.org>
To: Keith Owens <kaos@ocs.com.au>
Cc: Mikael Pettersson <mikpe@csd.uu.se>,
Russell King <rmk+lkml@arm.linux.org.uk>,
linux-kernel@vger.kernel.org
Subject: Re: [patch 2.6.12] Add -Wno-pointer-sign to HOSTCFLAGS
Date: Sun, 3 Jul 2005 21:22:24 +0200 [thread overview]
Message-ID: <20050703192224.GB8052@mars.ravnborg.org> (raw)
In-Reply-To: <11208.1119177144@ocs3.ocs.com.au>
>
> >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.
I am having this patch queued:
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/04/03 22:26:47+02:00 sam@mars.ravnborg.org
# kbuild: Use -Wno-pointer-sign when building for host
#
# Avoid lot's of useless warning when building host utilities.
# A brave sould may take a look sometime - but not all warnings are correct.
#
# From: Pawel Sikora <pluto@pld-linux.org>
# Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
#
# Makefile
# 2005/04/03 22:26:24+02:00 sam@mars.ravnborg.org +12 -4
# -Wno-pointer-sign for gcc 4.xx when compiling host programs
#
diff -Nru a/Makefile b/Makefile
--- a/Makefile 2005-04-30 00:35:17 +02:00
+++ b/Makefile 2005-04-30 00:35:17 +02:00
@@ -201,10 +201,10 @@
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
-HOSTCC = gcc
-HOSTCXX = g++
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
-HOSTCXXFLAGS = -O2
+HOSTCC := gcc
+HOSTCXX := g++
+HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCXXFLAGS := -O2
# Decide whether to build built-in, modular, or both.
# Normally, just do built-in.
@@ -538,6 +538,14 @@
# disable pointer signedness warnings in gcc 4.0
CFLAGS += $(call cc-option,-Wno-pointer-sign,)
+
+HOSTCFLAGS += $(shell if $(HOSTCC) $(HOSTCFLAGS) -Wno-pointer-sign -S \
+ -o /dev/null -xc /dev/null > /dev/null 2>&1; then \
+ echo "-Wno-pointer-sign"; fi ;)
+
+HOSTCXXFLAGS += $(shell if $(HOSTCXX) $(HOSTCXXFLAGS) -Wno-pointer-sign -S \
+ -o /dev/null -xc /dev/null > /dev/null 2>&1; then \
+ echo "-Wno-pointer-sign"; fi ;)
# Default kernel image to build when no specific target is given.
# KBUILD_IMAGE may be overruled on the commandline or
next prev parent reply other threads:[~2005-07-03 19:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-19 9:23 Mikael Pettersson
2005-06-19 9:58 ` Russell King
2005-06-19 10:32 ` Keith Owens
2005-07-03 19:22 ` Sam Ravnborg [this message]
-- 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=20050703192224.GB8052@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
--cc=rmk+lkml@arm.linux.org.uk \
/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
all inboxes | Powered by JetHome®