From 9f5b65166a9d87ea8ea71199ad65fd15837d3fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kijewski?= Date: Sun, 28 Sep 2014 14:56:29 +0200 Subject: [PATCH] make: del no-delete-null-pointer-checks for clang++ This PR enables the use of clang++ to compile C++ projects by adding `CXXUWFLAGS += -fno-delete-null-pointer-checks`, if `${CC}` understands `-fno-delete-null-pointer-checks` but `${CXX}` does not. --- Makefile.cflags | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/Makefile.cflags b/Makefile.cflags index 6bf285d051..ba94fa89c9 100644 --- a/Makefile.cflags +++ b/Makefile.cflags @@ -2,13 +2,13 @@ # Otherwise test if the compiler unterstands the "-std=gnu99" flag, and use it if so. # Otherwise test if the compiler unterstands the "-std=c99" flag, and use it if so. ifeq ($(filter -std=%,$(CFLAGS)),) -ifeq ($(shell $(CC) -std=gnu99 -E - 2>/dev/null >/dev/null /dev/null >/dev/null /dev/null >/dev/null /dev/null >/dev/null /dev/null >/dev/null &1 1>/dev/null &1 1>/dev/null /dev/null >/dev/null &1 1>/dev/null /dev/null >/dev/null