changeset 12629:8ba058ffbc2e

Clang 5.0 fixes
author twisti
date Tue, 29 Oct 2013 14:45:32 -0700
parents c36bdee8ca29
children aadb188e4258
files make/bsd/makefiles/gcc.make
diffstat 1 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/make/bsd/makefiles/gcc.make	Tue Oct 29 22:03:28 2013 +0100
+++ b/make/bsd/makefiles/gcc.make	Tue Oct 29 14:45:32 2013 -0700
@@ -144,7 +144,8 @@
     PCH_FLAG/sharedRuntimeTrig.o = $(PCH_FLAG/NO_PCH)
     PCH_FLAG/sharedRuntimeTrans.o = $(PCH_FLAG/NO_PCH)
     PCH_FLAG/unsafe.o = $(PCH_FLAG/NO_PCH)
-  
+    PCH_FLAG/graalCompilerToVM.o = $(PCH_FLAG/NO_PCH)
+
   endif
 else # ($(USE_CLANG), true)
   # check for precompiled headers support
@@ -309,17 +310,16 @@
 
 # Work around some compiler bugs.
 ifeq ($(USE_CLANG), true)
+  # Clang 4.2
   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
     OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
     OPT_CFLAGS/unsafe.o += -O1
   endif
   # Clang 5.0
   ifeq ($(shell expr $(CC_VER_MAJOR) = 5 \& $(CC_VER_MINOR) = 0), 1)
-    OPT_CFLAGS/graalCompilerToVM.o += -O1
+    OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
     OPT_CFLAGS/unsafe.o += -O1
-    # Specific optimization level plus precompiled headers produces:
-    #     error: __OPTIMIZE_SIZE__ predefined macro was enabled in PCH file but is currently disabled
-    USE_PRECOMPILED_HEADER = 0
+    OPT_CFLAGS/graalCompilerToVM.o += -O1
   endif
 else
   # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
@@ -328,6 +328,14 @@
   endif
 endif
 
+# 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)
+    CFLAGS += -stdlib=libc++
+  endif
+endif
+
 # Flags for generating make dependency flags.
 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
 ifeq ($(USE_CLANG),)