Hi Przemyslaw,

I apply your patch in config/linux/gcc.cf
with this exports :

export HB_CCPREFIX="mipsel-linux-gnu-"

export HB_BIN_COMPILE="/usr/local/bin"
export HB_PPGEN_PATH="/usr/local/bin"

export HB_WITHOUT_GTCRS="yes"
export HB_WITHOUT_ODBC="yes"
export HB_WITHOUT_X11="yes"
export HB_WITH_QT="no"

export HB_BIN_INSTALL="/usr/mipsel-linux-gnu/harbour/bin"
export HB_INC_INSTALL="/usr/mipsel-linux-gnu/harbour/include/harbour"
export HB_LIB_INSTALL="/usr/mipsel-linux-gnu/harbour/lib/harbour"

All is fine *except one point* :

When i run apps dynamic link on mips(el) i get a
segmentation fault :

g...@cobalt:~$ cat t.prg
#!/usr/local/bin/hbrun //GTCGI
?? "hello"
?
g...@cobalt:~$ ./t.prg
hello
g...@cobalt:~$ hbmk2 t
hbmk: Processing configuration: /usr/local/bin/hbmk.cfg Harbour 2.0.0beta1 (Rev. 11424)
Copyright (c) 1999-2009, http://www.harbour-project.org/
Compiling 't.prg'...
Lines 3, Functions/Procedures 1
Generating C source output to 't.c'... Done.
g...@cobalt:~$ ./t
Segmentation fault
g...@cobalt:~$ hbmk2 -static t
hbmk: Processing configuration: /usr/local/bin/hbmk.cfg Harbour 2.0.0beta1 (Rev. 11424)
Copyright (c) 1999-2009, http://www.harbour-project.org/
Compiling 't.prg'...
Lines 3, Functions/Procedures 1
Generating C source output to 't.c'... Done.
g...@cobalt:~$ ./t
hello
Thank you,

Guy



Przemyslaw Czerpak a écrit :
It should be enough to change in linux/gcc.cf CC, LD and AR definitions:
   CC = $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)
   LD = $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)
   AR = $(HB_CCPREFIX)ar

and then use:
   export HB_CCPREFIX=mipsel-linux-gnu-

It should work without any other modifications in source core code and
probably we should commit such modification. It can be usable also in few
other situations.

It should be also possible to create 'gcc' and 'ar' links  to
mipsel-linux-gnu-gcc and mipsel-linux-gnu-ar and then set this directory
in PATH before path with native 'gcc' and 'ar' binaries.
This will work with existing code without any modifications but it does
not allow to use two passes (native and cross) compilation which can be
usable in some situations, f.e. building binaries without installed native
harbour.

best regards,
Przemek

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to