Commit 3c521e06 authored by Olaf Hering's avatar Olaf Hering Committed by Sam Ravnborg

[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: default avatarOlaf Hering <>
Signed-off-by: default avatarSam Ravnborg <>
parent ce454d4d
......@@ -203,7 +203,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
HOSTCC = gcc
HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
HOSTCFLAGS = -Wall -Wundef -Wstrict-prototypes -O2 -fomit-frame-pointer
# Decide whether to build built-in, modular, or both.
......@@ -348,7 +348,7 @@ LINUXINCLUDE := -Iinclude \
CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment