On Sun, 22 Nov 2009, Viktor Szakáts wrote:

 > > 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_BUILD_DEBUG=yes
HB_CONTRIBLIBS=no
HB_COMMERCE=yes
HB_INSTALL_PREFIX=/home/ice/w/xhb/hbci/inst/linux/gcc/c
HB_COMPILER=gcc
HB_BUILD_MODE=c
HB_BUILD_OPTIM=no
HB_PLATFORM=linux
HB_CCPREFIX=llvm-
===
! Building Harbour 2.0.0beta3 from source - http://www.harbour-project.org
! MAKE: make 3.81 /bin/sh   
! HB_INSTALL_PREFIX: /home/ice/w/xhb/hbci/inst/linux/gcc/c
! HB_BUILD_DEBUG: yes
! HB_BUILD_OPTIM: no
! HB_BUILD_MODE: c
! HB_CONTRIBLIBS: no
! HB_HOST_PLAT: linux (x86_64)  HB_SHELL: sh
! HB_PLATFORM: linux (x86_64) 
! HB_COMPILER: gcc 
! Component: 'zlib' found in /usr/include 
! Component: 'pcre' found in /usr/include 
! Component: 'openssl' found in /usr/include 
! Component: 'gpm' explicitly disabled
! Component: 'slang' explicitly disabled
! Component: 'curses' found in /usr/include 
! Component: 'x11' found in /usr/include 
! Component: 'wattcp/watt-32' not supported on linux platform
! REVISION: 12974
make[2]: Nothing to be done for `all'.
make[1]: Nothing to be done for `all'.
llvm-gcc  -I. -I../../../../../include  -g -DHB_TR_LEVEL_DEBUG  -I/usr/include 
-I/usr/include  -o_hbhbpdf.o -c ../../../_hbhbpdf.c
[...]
llvm-gcc  -I. -I../../../../../include  -Wall -W -g -DHB_TR_LEVEL_DEBUG   
-ostrwild_dyn.o -DHB_DYNLIB -fpic -c ../../../strwild.c
( llvm-ar   rcs ../../../../../lib/linux/gcc/libhbcommon.a expropt1.o 
expropt2.o hbffind.o hbfopen.o hbfsapi.o hbgete.o hbwince.o hbhash.o hbprintf.o 
hbstr.o hbdate.o hbmem.o hbtrace.o hbver.o hbverdsp.o hbarch.o reserved.o 
strwild.o  ) || ( rm -f ../../../../../lib/linux/gcc/libhbcommon.a && false )
llvm-gcc  -I. -I../../../../../include  -Wall -W -g -DHB_TR_LEVEL_DEBUG   
-onortl.o -c ../../../nortl.c
( llvm-ar   rcs ../../../../../lib/linux/gcc/libhbnortl.a nortl.o  ) || ( rm -f 
../../../../../lib/linux/gcc/libhbnortl.a && false )
llvm-gcc  -I. -I../../../../../include  -Wall -W -g -DHB_TR_LEVEL_DEBUG   
-ohbpp.o -c ../../../hbpp.c
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
make[3]: *** [hbpp] Error 1
rm hbpp.o
make[2]: *** [descend] Error 2
make[1]: *** [pp] Error 2
make: *** [src] Error 2

but using this:

--- gcc.mk      2009-11-22 14:00:24.000000000 +0100
+++ llvm-gcc.mk 2009-11-22 14:03:30.000000000 +0100
@@ -3,9 +3,9 @@
 #
 
 ifeq ($(HB_BUILD_MODE),cpp)
-   HB_CMP := g++
+   HB_CMP := llvm-g++
 else
-   HB_CMP := gcc
+   HB_CMP := llvm-gcc
 endif
 
 OBJ_EXT := .o

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

Index: postinst.sh
===================================================================
--- postinst.sh (revision 12974)
+++ postinst.sh (working copy)
@@ -49,7 +49,8 @@
    [ "$HB_COMPILER" = "cygwin" ] || \
    [ "$HB_COMPILER" = "djgpp" ] || \
    [ "$HB_COMPILER" = "icc" ] || \
-   [ "$HB_COMPILER" = "sunpro" ]
+   [ "$HB_COMPILER" = "sunpro" ] || \
+   [ "$HB_COMPILER" = "llvm-gcc" ]
 then
     if [ -n "${HB_TOOLS_PREF}" ]; then
         
hb_mkdyn="${HB_INST_PKGPREF}${HB_BIN_INSTALL}/${HB_TOOLS_PREF}-mkdyn"

this, and the installed tree seems mostly ok (what not ok is the 
dynlib link generation, which is probably due to hb-mkdyn.sh also in 
need of some massaging).

full build logs of both cases are available if needed (my build tests 
only do hb core, ie. no contribs or anything).

-- 
[-]

mkdir /nonexistent
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to