Is anyone using clang/clang++ to build hotspot? (original) (raw)

Tim Bell tim.bell at oracle.com
Wed Jul 3 07:58:09 PDT 2013


Hello

I see that hotspot/make/bsd/makefiles/gcc.make contains several sections of:

ifeq ($(USE_CLANG),) [...] else [...] endif

On a 10.8 Mac with the command line tools installed, trying to use clang to build hotspot fails early on when building adlc because it uses the wrong linker and does not get the C++ runtiime (see below). This leads me to wonder if anyone is using this path through the Makefiles.

Thanks in advance-

Tim Bell

Making adlc /usr/bin/clang -m64 -mno-omit-leaf-frame-pointer -mstack-alignment=16
-m64 -mno-omit-leaf-frame-pointer -mstack-alignment=16 -o ../generated/adfiles/adlc ../generated/adfiles/adlparse.o ../generated/adfiles/archDesc.o ../generated/adfiles/arena.o ../generated/adfiles/dfa.o ../generated/adfiles/dict2.o ../generated/adfiles/filebuff.o ../generated/adfiles/forms.o ../generated/adfiles/formsopt.o ../generated/adfiles/formssel.o ../generated/adfiles/main.o ../generated/adfiles/adlc-opcodes.o ../generated/adfiles/output_c.o ../generated/adfiles/output_h.o Undefined symbols for architecture x86_64: "std::ostream::operator<<(int)", referenced from: printline(std::ostream&, char const*, int, char const*, int, int) in filebuff.o [...] "operator new(unsigned long)", referenced from: ADLParser::instr_parse() in adlparse.o ADLParser::oper_parse() in adlparse.o ADLParser::opclass_parse() in adlparse.o ADLParser::ins_attr_parse() in adlparse.o ADLParser::op_attr_parse() in adlparse.o ADLParser::source_parse() in adlparse.o ADLParser::source_hpp_parse() in adlparse.o ... (maybe you meant: __ZnwmiPKci) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[8]: *** [../generated/adfiles/adlc] Error 1 make[7]: *** [ad_stuff] Error 2 make[6]: *** [fastdebug] Error 2 make[5]: *** [generic_build2] Error 2 make[4]: *** [fastdebug] Error 2 make[3]: *** [all_fastdebug_universal] Error 2 make[2]: *** [universal_fastdebug] Error 2 make[1]: *** [/opt/jprt/tbell/8019470/build/macosx-x86_64-normal-server-fastdebug/hotspot/_hotspot.timestamp] Error 2 make: *** [hotspot-only] Error 2



More information about the macosx-port-dev mailing list