kbuild: remove unsupported clang flag
authorStefan Agner <stefan@agner.ch>
Sun, 6 Aug 2017 09:10:26 +0000 (02:10 -0700)
committerStefan Agner <stefan@agner.ch>
Mon, 7 Aug 2017 06:21:11 +0000 (23:21 -0700)
The delete-null-pointer-checks flag is not supported by current
clang versions. Do not add it to the CLFAGS in the clang case.

This gets rid of warnings like below when using clang as HOSTCC:
  warning: optimization flag '-fno-delete-null-pointer-checks' is not supported

Signed-off-by: Stefan Agner <stefan@agner.ch>
Makefile

index cd1cb6068ef89231c6de527039c1396f6e7e1b1e..125d4dcf0d2189205a5d3ce67a031116cf4caf1c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -308,7 +308,7 @@ HOST_LOADLIBES := $(HOST_LFS_LIBS)
 
 ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)
 HOSTCFLAGS  += -Wno-unused-value -Wno-unused-parameter \
-               -Wno-missing-field-initializers -fno-delete-null-pointer-checks
+               -Wno-missing-field-initializers
 endif
 
 # Decide whether to build built-in, modular, or both.