On Sun, 22 Nov 2009, Tamas TEVESZ wrote: Hi,
> > > could you also add this (llvm-gcc) target to the mix? for all intents > > > and purposes, it is the very same as the gcc target, except compilers > > > being llvm-gcc and llvm-g++ instead of gcc and g++, respectively. > > Can you try if it works by setting HB_CCPREFIX=llvm- > > and using gcc target? If this seems ok, I may add it, > no, it doesn't: [...] > HB_COMPILER=gcc > HB_BUILD_OPTIM=no Why do you disable optimization? > HB_PLATFORM=linux > HB_CCPREFIX=llvm- [...] > llvm-gcc -I. -I../../../../../include -Wall -W -g -DHB_TR_LEVEL_DEBUG > -ohbpp_dyn.o -DHB_DYNLIB -fpic -c ../../../hbpp.c > llvm-gcc -Wall -W -g -L../../../../../lib/linux/gcc > -o../../../../../bin/linux/gcc/hbpp hbpp.o -lhbnortl -lhbcommon -lm > ../../../../../lib/linux/gcc/libhbnortl.a: > could not read symbols: Archive has no index; run ranlib to add one > collect2: ld returned 1 exit status You have quite precise error message here. I've just checked that also in Suse11.2 llvm-ranlib does not create index which can be recognized by llvm-gcc. It's probably bug which should be reported to LLVM developers. As workaround I used ranlib instead of llvm-ranlib to create indexes and created full harbour build using HB_CCPREFIX=llvm- without any problems. Index: harbour/config/linux/gcc.mk =================================================================== -AR_RULE = ( $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ $(^F) $(ARSTRIP) ) || ( $(RM) $(LIB_DIR)/$@ && false ) +AR_RULE = ( $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ $(^F) $(ARSTRIP) && ranlib $(LIB_DIR)/$@ ) || ( $(RM) $(LIB_DIR)/$@ && false ) I also made speed tests using speedtst.prg for pure GCC, llvm-gcc, and CLANG builds. Here are results (HB_FM_DL_ALLOC was enabled in all builds to force the same memory manager and make results more comparable) 2009.11.22 19:11:15 Linux 2.6.31.5-0.1-desktop x86_64 Harbour 2.0.0beta3 (Rev. 12970) GNU C 4.4 (64-bit) x86-64 [...] [ total application time: ]....................................15.62 [ total real time: ]...........................................15.65 2009.11.22 19:21:52 Linux 2.6.31.5-0.1-desktop x86_64 Harbour 2.0.0beta3 (Rev. 12970) LLVM/GNU C 4.2.1 (64-bit) x86-64 [...] [ total application time: ]....................................17.73 [ total real time: ]...........................................17.76 2009.11.22 19:27:42 Linux 2.6.31.5-0.1-desktop x86_64 Harbour 2.0.0beta3 (Rev. 12970) LLVM/Clang C 4.2.1 (64-bit) x86-64 [...] [ total application time: ]....................................18.11 [ total real time: ]...........................................18.14 as you can see native GCC build is noticeable faster then LLVM-GCC (~14%) and CLANG (~16%) ones. > but using this: [...] > it does (HB_COMPILER=llvm-gcc). i have no idea what the essential > difference is, but this way it does, HB_CCPREFIX way it doesn't. i've > also modified postinst.sh like The difference is that such version used 'ar' instead of 'llvm-ar' which created working library indexes. Probably as dirty hack you can try to replace 'llvm-ar' with link to 'ar' and HB_CCPREFIX will work for you without any problems. best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour