# HG changeset patch # User twisti # Date 1383083132 25200 # Node ID 8ba058ffbc2edef91fcb8bb2c0f9c285e1fc2d8e # Parent c36bdee8ca293a367f0d39bef4e9610e62588a88 Clang 5.0 fixes diff -r c36bdee8ca29 -r 8ba058ffbc2e make/bsd/makefiles/gcc.make --- 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),)