diff make/bsd/makefiles/gcc.make @ 14171:8c0e92c8c45b

more workarounds to support clang 5.1 on Mac OS X
author Doug Simon <doug.simon@oracle.com>
date Thu, 13 Mar 2014 14:48:01 +0100
parents f97c5ec83832
children 29ccc4cbabca
line wrap: on
line diff
--- a/make/bsd/makefiles/gcc.make	Thu Mar 13 13:49:03 2014 +0100
+++ b/make/bsd/makefiles/gcc.make	Thu Mar 13 14:48:01 2014 +0100
@@ -336,7 +336,7 @@
 # We want to use libc++ on Clang 5.0
 ifeq ($(USE_CLANG), true)
   # Clang 5.0
-  ifeq ($(shell expr $(CC_VER_MAJOR) = 5 \& $(CC_VER_MINOR) = 0), 1)
+  ifeq ($(shell expr $(CC_VER_MAJOR) = 5 \& \( $(CC_VER_MINOR) = 0 \| $(CC_VER_MINOR) = 1 \) ), 1)
     CFLAGS += -stdlib=libc++
   endif
 endif
@@ -378,6 +378,11 @@
 #------------------------------------------------------------------------
 # Linker flags
 
+# Ensure use libstdc++ on clang, not libc++
+ifeq ($(USE_CLANG), true)
+  LFLAGS += -stdlib=libstdc++
+endif
+
 # statically link libstdc++.so, work with gcc but ignored by g++
 STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic