tree 5904f3b98801b2c86f15abea327e4a9c5dbeffee
parent ce454d4d7278b815dcee957653ce388146484f5f
author Olaf Hering <[EMAIL PROTECTED]> Thu, 21 Jul 2005 21:02:09 +0200
committer Sam Ravnborg <[EMAIL PROTECTED](none)> Thu, 21 Jul 2005 21:45:47 +0000

[PATCH] kbuild: add -Wundef to global CFLAGS

A recent change to the aic scsi driver removed two defines to detect
endianness. cpp handles undefined strings as 0. As a result, the test turned
into #if 0 == 0 and the wrong code was selected.
Adding -Wundef to global CFLAGS will catch such errors.

Signed-off-by: Olaf Hering <[EMAIL PROTECTED]>
Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>

 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -203,7 +203,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
 
 HOSTCC         = gcc
 HOSTCXX        = g++
-HOSTCFLAGS     = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCFLAGS     = -Wall -Wundef -Wstrict-prototypes -O2 -fomit-frame-pointer
 HOSTCXXFLAGS   = -O2
 
 #      Decide whether to build built-in, modular, or both.
@@ -348,7 +348,7 @@ LINUXINCLUDE    := -Iinclude \
 
 CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
 
-CFLAGS                 := -Wall -Wstrict-prototypes -Wno-trigraphs \
+CFLAGS                 := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
                   -fno-strict-aliasing -fno-common \
                   -ffreestanding
 AFLAGS         := -D__ASSEMBLY__
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to