changeset 5082:0da367b01e32

. Don't turn on -fcheck-new if compiling with clang (since it doesn't support that option). Submitted by: jkim@FreeBSD.org
author Greg Lewis <glewis@eyesbeyond.com>
date Sun, 20 Apr 2014 12:32:58 -0700
parents b7143375fd00
children 929c0cb1bbc5
files make/bsd/makefiles/gcc.make
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/make/bsd/makefiles/gcc.make	Sat Apr 19 01:27:09 2014 -0700
+++ b/make/bsd/makefiles/gcc.make	Sun Apr 20 12:32:58 2014 -0700
@@ -116,7 +116,10 @@
 CFLAGS += -fno-rtti
 CFLAGS += -fno-exceptions
 CFLAGS += -pthread
-CFLAGS += -fcheck-new
+# Clang does not support -fcheck-new
+ifeq (,$(findstring clang,$(shell $(CC) -v 2>&1)))
+  CFLAGS += -fcheck-new
+endif
 # version 4 and above support fvisibility=hidden (matches jni_x86.h file)
 # except 4.1.2 gives pointless warnings that can't be disabled (afaik)
 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"