summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-07-13 09:11:37 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-07-13 09:12:43 +0200
commit0011d7c1fc43d51359f2f966215049e0ee8f5b62 (patch)
treefc28111e83fb043ece2aafd1fafcbd4fc99518b8 /Makefile
parentc510a6429332e2b8a92d691055cd4e1ad133cc56 (diff)
downloadbarebox-0011d7c1fc43d51359f2f966215049e0ee8f5b62.tar.gz
barebox-0011d7c1fc43d51359f2f966215049e0ee8f5b62.tar.xz
Makefile: Use cc-option for -fno-delete-null-pointer-checks
To only pass this option when it's supported by the compiler. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0fe927403d..5a7fd5f8a1 100644
--- a/Makefile
+++ b/Makefile
@@ -301,8 +301,7 @@ CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffre
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Werror-implicit-function-declaration \
- -fno-strict-aliasing -fno-common -Os -pipe \
- -fno-delete-null-pointer-checks
+ -fno-strict-aliasing -fno-common -Os -pipe
AFLAGS := -D__ASSEMBLY__
LDFLAGS_barebox := -Map barebox.map
@@ -457,6 +456,8 @@ CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
CFLAGS += $(call cc-disable-warning, trampolines)
+CFLAGS += $(call cc-option, -fno-delete-null-pointer-checks,)
+
# arch Makefile may override CC so keep this after arch Makefile is included
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
CHECKFLAGS += $(NOSTDINC_FLAGS)