Thanks Guy. Maybe it's simpler to just add HB_CCPREFIX support to that AR macro in gcc.cf:
AR = ${HB_CCPREFIX}ar
And set HB_CCPREFIX accordingly:
export HB_CCPREFIX=mipsel-linux-gnu-
This envvar should also make hbmk2 work. Can you try?
In case we made these work, we can probably add a new
target called linux/gccmips (with .cf and full hbmk2 support).
Brgds,
Viktor
On 2009.06.19., at 12:34, Guy Roussin wrote:
Hi, I manage to cross compile harbour for mips(el). Perhaps this would be usefull for someone ...I think you can replace mipsel with your target architecture (arm, ...)$ pwd /usr/local/src/harbour $ svn update At revision 11424. $ cp config/linux/gcc.cf config/linux/mipsel-linux-gnu-gcc.cf $ cat diff4mipsel.patch | patch -p0 $ export HB_BIN_COMPILE=/usr/local/bin $ export HB_PPGEN_PATH=/usr/local/bin $ export HB_WITHOUT_ODBC=yes $ export HB_WITHOUT_GTCRS=yes $ export HB_WITHOUT_X11=yes $ export HB_WITH_QT=no $ export HB_COMPILER=mipsel-linux-gnu-gcc $ export HB_BIN_INSTALL=/usr/mipsel-linux-gnu/harbour/bin $ export HB_INC_INSTALL=/usr/mipsel-linux-gnu/harbour/include $ export HB_LIB_INSTALL=/usr/mipsel-linux-gnu/harbour/lib $ sh make_gnu.sh Before install we need to patch bin/postinst.sh $ cat diffpostinst4mipsel.patch | patch -p0 $ sh make_gnu.sh install Notice that when i run hbmk2 on mipsel it complains with : g...@cobalt:~$ uname -aLinux cobalt 2.6.26-2-r5k-cobalt #1 Fri May 29 07:53:52 UTC 2009 mips GNU/Linuxg...@cobalt:~$ hbmk2 thbmk: Please choose a C compiler by using -comp= option or envvar HB_COMPILER. You have the following choices on your platform: gcc, gpp, watcom, icc g...@cobalt:~$ which gcc/usr/bin/gcc Guy--- config/linux/mipsel-linux-gnu-gcc.cf.orig 2009-06-19 11:32:44.000000000 +0200 +++ config/linux/mipsel-linux-gnu-gcc.cf 2009-06-19 11:33:11.000000000 +0200@@ -110,7 +110,7 @@ LDFLAGS = $(LINKPATHS) -AR = ar +AR = mipsel-linux-gnu-ar ARFLAGS = $(HB_USER_AFLAGS)AR_RULE = $(AR) $(ARFLAGS) crs $(LIB_DIR)/$@ $(^F) || ( $(RM) $ (LIB_DIR)/$@ && false )--- bin/postinst.sh.orig 2009-06-19 12:23:50.000000000 +0200 +++ bin/postinst.sh 2009-06-19 12:23:30.000000000 +0200 @@ -41,6 +41,7 @@ . ${hb_root}/bin/hb-func.sh if [ "$HB_COMPILER" = "gcc" ] || \ + [ "$HB_COMPILER" = "mipsel-linux-gnu-gcc" ] || \ [ "$HB_COMPILER" = "gpp" ] || \ [ "$HB_COMPILER" = "mingw" ] || \ [ "$HB_COMPILER" = "mingw64" ] || \ @@ -98,6 +99,7 @@ mk_hbtools "${HB_BIN_INSTALL}" "$@" if [ "$HB_COMPILER" = "gcc" ] || \ + [ "$HB_COMPILER" = "mipsel-linux-gnu-gcc" ] || \ [ "$HB_COMPILER" = "gpp" ] || \ [ "$HB_COMPILER" = "mingw" ] || \ [ "$HB_COMPILER" = "mingw64" ] || \ _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
