Skip to contentSkip to conversation

Add -Wno-pointer-sign to HOSTCFLAGS

PATCH In review Keith Owens 3 participants 3 messages Jun 19, 2005 – Jul 3, 2005 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add -Wno-pointer-sign to HOSTCFLAGS

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.

Makefile +2 -0
Index: 2.6.12/Makefile
===================================================================
@@ -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
 
 # 	Decide whether to build built-in, modular, or both.
#1 lore raw
Quoted 5 lines · Keith Owens

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.

Although I am a bit nervous about papering over these warnings without addressing them... I still ACK the patch, because gcc4 on FC4 does indeed spew a bunch of noise.

Have you (or anyone) looked into the "root cause" of these warnings?

Jeff

#2 lore raw
Quoted 5 lines · Jeff Garzik
Quoted 4 lines · Keith Owens

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.

Quoted 8 lines
Quoted 1 line

Although I am a bit nervous about papering over these warnings without addressing them... I still ACK the patch, because gcc4 on FC4 does indeed spew a bunch of noise.

Have you (or anyone) looked into the "root cause" of these warnings?

I've receive a few pathes to scripts/ fixing this.
They almost all just used casts to hide the warning but some included real fixes. They are all lost for now though.

Sam