Mercurial > hg > graal-compiler
changeset 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 | cdc20b409a9c |
children | cd22c8dbda4f |
files | make/bsd/makefiles/gcc.make src/share/vm/opto/node.cpp |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
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
--- a/src/share/vm/opto/node.cpp Thu Mar 13 13:49:03 2014 +0100 +++ b/src/share/vm/opto/node.cpp Thu Mar 13 14:48:01 2014 +0100 @@ -285,6 +285,10 @@ #ifdef _MSC_VER // the IDX_INIT hack falls foul of warning C4355 #pragma warning( disable:4355 ) // 'this' : used in base member initializer list #endif +#ifdef __clang__ +#pragma clang diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" +#endif // Out-of-line code from node constructors. // Executed only when extra debug info. is being passed around. @@ -468,6 +472,9 @@ _in[6] = n6; if (n6 != NULL) n6->add_out((Node *)this); } +#ifdef __clang__ +#pragma clang diagnostic pop +#endif //------------------------------clone------------------------------------------ // Clone a Node.