Graal on Mavericks
Christian Thalinger
christian.thalinger at oracle.com
Thu Oct 24 17:50:53 PDT 2013
On Oct 23, 2013, at 7:36 AM, Lukas Stadler <lukas.stadler at jku.at> wrote:
> In case someone is trying to get Graal to compile on OS X Mavericks - I had to add the following to mx/env to make it run:
>
> COMPILER_WARNINGS_FATAL=false
> USE_CLANG=true
> LFLAGS=-Xlinker -lstdc++
>
> If it doesn’t take too long, I suggest we wait for the relevant changes from hotspot before we implement them ourselves.
I’m also on Mavericks and I have a fix. Unfortunately it is unlikely that I can push it to hsx25 given we are so late in the 8 cycle. Might have to wait until we open the 9 repositories.
Here is the fix. It also adds the missing optimization-level downgrade for loopTransform.o. I can push this to the Graal repository if you want.
diff -r f7d928a3181c make/bsd/makefiles/gcc.make
--- a/make/bsd/makefiles/gcc.make Thu Oct 24 19:32:34 2013 +0200
+++ b/make/bsd/makefiles/gcc.make Thu Oct 24 17:49:39 2013 -0700
@@ -314,10 +314,16 @@ OPT_CFLAGS/NOOPT=-O0
# 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/loopTransform.o += $(OPT_CFLAGS/NOOPT)
+ OPT_CFLAGS/unsafe.o += -O1
+ endif
else
# 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1)
@@ -325,6 +331,14 @@ else
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),)
>
> - Lukas
More information about the graal-dev
mailing list