From 0011d7c1fc43d51359f2f966215049e0ee8f5b62 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 13 Jul 2015 09:11:37 +0200 Subject: 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 --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') 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) -- cgit v1.2.3