2010-07-16 18:22 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* external/minizip/minizip.dif
+ Updated after latest changed by Tamas Tevesz. Thanks a lot!
* utils/hbmk2/hbmk2.prg
+ Added support for vxworks/diab compiler.
* utils/hbtest/hbtest.prg
+ Added my name to the copyright header.
* config/global.mk
! Fixed to only assign *nix specific default value HB_INSTALL_PREFIX
on *nix hosts (only a problem when doing *nix cross-builds _from_
non-*nix systems).
* utils/hbmk2/hbmk2.prg
* config/vxworks/gcc.mk
* config/vxworks/diab.mk
+ Added minimal support for HB_BUILD_SHARED=yes for vxworks targets.
For diab it just won't find the harbour .so (see comment for more)
For gcc it links okay, though it's detected as kernel task, so
current support is most probably not right.
* config/vxworks/diab.mk
* Minor change to sync one C compiler option with VxWorks Workbench
generated one.
; NOTE: By this change Harbour VxWorks base port is finished. Besides
being an interesting excercise, it helped to develope new
non-*nix to *nix cross building codepaths, tweak Harbour for
"headless" (w/o terminal) OSes, and to break the ground for
target CPU selection inside one target platform.
Harbour builds cleanly using both vxworks/gcc and vxworks/diab,
and compiler tools plus non-MT utils run properly as well.
Obviously I made few functional tests, but from the experiences
of the port effort, these are the remaining areas:
- reporting bug(s) to Wind River (particularly the one
breaking hvm.c compilation, requiring HB_LONG_LONG_OFF
forcage, causing other unnecessary limits and hbtest
failures)
- serial I/O needs to be implemented using VxWorks specific
sioLib API
- 'fork' has to be replaced.
- sockets were not tested, anyhow they are supposed to work.
- termios is missing, so large parts of GTSTD and GTTRM are
disabled on this platform.
- ARM/MIPS CPU support needs to be added to hbatomic.h
- HB_LIBLOAD() and friends need to be implemented, but I hit
walls here.
- MT apps GPFs, this needs to be fixed probably inside our
code, but it's possible some build options are needed which
I missed all along.
- HB_SHARED_MODE=yes needs further tweaking.
This commit is contained in:
@@ -16,10 +16,65 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-07-16 18:22 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* external/minizip/minizip.dif
|
||||
+ Updated after latest changed by Tamas Tevesz. Thanks a lot!
|
||||
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ Added support for vxworks/diab compiler.
|
||||
|
||||
* utils/hbtest/hbtest.prg
|
||||
+ Added my name to the copyright header.
|
||||
|
||||
* config/global.mk
|
||||
! Fixed to only assign *nix specific default value HB_INSTALL_PREFIX
|
||||
on *nix hosts (only a problem when doing *nix cross-builds _from_
|
||||
non-*nix systems).
|
||||
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
* config/vxworks/gcc.mk
|
||||
* config/vxworks/diab.mk
|
||||
+ Added minimal support for HB_BUILD_SHARED=yes for vxworks targets.
|
||||
For diab it just won't find the harbour .so (see comment for more)
|
||||
For gcc it links okay, though it's detected as kernel task, so
|
||||
current support is most probably not right.
|
||||
|
||||
* config/vxworks/diab.mk
|
||||
* Minor change to sync one C compiler option with VxWorks Workbench
|
||||
generated one.
|
||||
|
||||
; NOTE: By this change Harbour VxWorks base port is finished. Besides
|
||||
being an interesting excercise, it helped to develope new
|
||||
non-*nix to *nix cross building codepaths, tweak Harbour for
|
||||
"headless" (w/o terminal) OSes, and to break the ground for
|
||||
target CPU selection inside one target platform.
|
||||
Harbour builds cleanly using both vxworks/gcc and vxworks/diab,
|
||||
and compiler tools plus non-MT utils run properly as well.
|
||||
|
||||
Obviously I made few functional tests, but from the experiences
|
||||
of the port effort, these are the remaining areas:
|
||||
- reporting bug(s) to Wind River (particularly the one
|
||||
breaking hvm.c compilation, requiring HB_LONG_LONG_OFF
|
||||
forcage, causing other unnecessary limits and hbtest
|
||||
failures)
|
||||
- serial I/O needs to be implemented using VxWorks specific
|
||||
sioLib API
|
||||
- 'fork' has to be replaced.
|
||||
- sockets were not tested, anyhow they are supposed to work.
|
||||
- termios is missing, so large parts of GTSTD and GTTRM are
|
||||
disabled on this platform.
|
||||
- ARM/MIPS CPU support needs to be added to hbatomic.h
|
||||
- HB_LIBLOAD() and friends need to be implemented, but I hit
|
||||
walls here.
|
||||
- MT apps GPFs, this needs to be fixed probably inside our
|
||||
code, but it's possible some build options are needed which
|
||||
I missed all along.
|
||||
- HB_SHARED_MODE=yes needs further tweaking.
|
||||
|
||||
2010-07-16 09:04 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbide/idebrowse.prg
|
||||
! Fixed: ideDBU - sequential search on a character field was
|
||||
making exact comparison, i.e., fieldval == searchval, now
|
||||
! Fixed: ideDBU - sequential search on a character field was
|
||||
making exact comparison, i.e., fieldval == searchval, now
|
||||
it is : fieldval = searchval.
|
||||
|
||||
2010-07-16 15:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
@@ -346,7 +401,7 @@
|
||||
|
||||
; TOFIX:
|
||||
- Unrecoverable error 9998: Harbour terminal (GT) initialization failure
|
||||
when running hbtest.
|
||||
when running hbtest. [DONE]
|
||||
- GPF when running hbmk2 and hbrun. (hbformat, hbi18 startup fine)
|
||||
It's related to MT mode.
|
||||
|
||||
@@ -452,7 +507,7 @@
|
||||
; NOTE: - vxworks has no termios, for serial comm
|
||||
support it has sioLib.h.
|
||||
- vxworks supports another C compiler, which
|
||||
was not tested yet.
|
||||
was not tested yet. [DONE]
|
||||
- vxworks supports lots of CPUs, only x86 was
|
||||
tested yet.
|
||||
- There are still mutex related warnings to sort out.
|
||||
|
||||
@@ -1447,6 +1447,7 @@ else
|
||||
ifneq ($(DESTDIR),)
|
||||
HB_INSTALL_PREFIX := $(DESTDIR)
|
||||
else
|
||||
ifneq ($(HB_HOST_PLAT_UNIX),)
|
||||
# Stick to *nix customs. I do not like it, it needs admin.
|
||||
HB_INSTALL_PREFIX := /usr/local
|
||||
# Add postfix for cross builds
|
||||
@@ -1457,6 +1458,7 @@ else
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
HB_INSTALL_PREFIX := $(subst /,$(DIRSEP),$(HB_INSTALL_PREFIX))
|
||||
else
|
||||
|
||||
@@ -76,6 +76,12 @@ DLIBPATHS := $(foreach dir,$(LIB_DIR) $(SYSLIBPATHS_DYN),-L$(dir))
|
||||
|
||||
LDLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS_BIN),-l$(lib))
|
||||
|
||||
ifeq ($(HB_BUILD_SHARED),yes)
|
||||
# TOFIX: .so is referred by it's full link time search path,
|
||||
# there is even a backslash present in the dir formed by
|
||||
# the linker
|
||||
LDFLAGS += -Wl, -Xdynamic
|
||||
endif
|
||||
LDFLAGS += $(LDLIBPATHS)
|
||||
|
||||
AR := $(HB_CCPREFIX)dar
|
||||
|
||||
@@ -54,6 +54,10 @@ DLIBPATHS := $(foreach dir,$(LIB_DIR) $(SYSLIBPATHS_DYN),-L$(dir))
|
||||
|
||||
LDLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS_BIN),-l$(lib))
|
||||
|
||||
ifeq ($(HB_BUILD_SHARED),yes)
|
||||
# TOFIX: no entry point
|
||||
LDFLAGS += -shared
|
||||
endif
|
||||
LDFLAGS += $(LDLIBPATHS)
|
||||
|
||||
AR := $(HB_CCPREFIX)ar$(HB_CCPOSTFIX)
|
||||
|
||||
34
harbour/external/minizip/minizip.dif
vendored
34
harbour/external/minizip/minizip.dif
vendored
@@ -1,6 +1,6 @@
|
||||
diff -urN minizip.orig/crypt.h minizip/crypt.h
|
||||
--- minizip.orig/crypt.h 2010-07-16 00:52:06.960236990 +0200
|
||||
+++ minizip/crypt.h 2010-07-16 00:52:06.970234708 +0200
|
||||
--- minizip.orig/crypt.h 2010-07-16 15:11:30.820235577 +0200
|
||||
+++ minizip/crypt.h 2010-07-16 15:11:30.820235577 +0200
|
||||
@@ -38,6 +38,8 @@
|
||||
* unpredictable manner on 16-bit systems; not a problem
|
||||
* with any known compiler so far, though */
|
||||
@@ -11,8 +11,8 @@ diff -urN minizip.orig/crypt.h minizip/crypt.h
|
||||
return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
|
||||
}
|
||||
diff -urN minizip.orig/ioapi.c minizip/ioapi.c
|
||||
--- minizip.orig/ioapi.c 2010-07-16 00:52:06.980235219 +0200
|
||||
+++ minizip/ioapi.c 2010-07-16 00:52:06.980235219 +0200
|
||||
--- minizip.orig/ioapi.c 2010-07-16 15:11:30.820235577 +0200
|
||||
+++ minizip/ioapi.c 2010-07-16 15:11:30.820235577 +0200
|
||||
@@ -15,6 +15,7 @@
|
||||
#endif
|
||||
|
||||
@@ -143,9 +143,9 @@ diff -urN minizip.orig/ioapi.c minizip/ioapi.c
|
||||
pzlib_filefunc_def->zopen_file = fopen_file_func;
|
||||
pzlib_filefunc_def->zread_file = fread_file_func;
|
||||
diff -urN minizip.orig/ioapi.h minizip/ioapi.h
|
||||
--- minizip.orig/ioapi.h 2010-07-16 00:52:06.980235219 +0200
|
||||
+++ minizip/ioapi.h 2010-07-16 00:52:06.980235219 +0200
|
||||
@@ -21,29 +21,40 @@
|
||||
--- minizip.orig/ioapi.h 2010-07-16 15:11:30.820235577 +0200
|
||||
+++ minizip/ioapi.h 2010-07-16 15:11:30.820235577 +0200
|
||||
@@ -21,29 +21,50 @@
|
||||
#ifndef _ZLIBIOAPI64_H
|
||||
#define _ZLIBIOAPI64_H
|
||||
|
||||
@@ -189,10 +189,20 @@ diff -urN minizip.orig/ioapi.h minizip/ioapi.h
|
||||
|
||||
+#include "hbsetup.h"
|
||||
+
|
||||
+#if defined( HB_OS_VXWORKS ) && defined( _STD_USING_INT_TYPES )
|
||||
+ /* NOTE: Hack to avoid collision between stdint.h and types/vxTypes.h. [vszakats] */
|
||||
+ #ifndef __BIT_TYPES_DEFINED__
|
||||
+ #define __BIT_TYPES_DEFINED__
|
||||
+ #endif
|
||||
+ #ifndef _SYS_INT_TYPES_H
|
||||
+ #define _SYS_INT_TYPES_H
|
||||
+ #endif
|
||||
+#endif
|
||||
+
|
||||
+#if defined( __BORLANDC__ ) || \
|
||||
+ defined( __WATCOMC__ ) || \
|
||||
+ defined( __MINGW32CE__ ) || \
|
||||
+ defined( __DCC__ ) || \
|
||||
+ defined( HB_OS_VXWORKS ) || \
|
||||
+ defined( HB_OS_BSD ) || \
|
||||
+ defined( HB_OS_DARWIN ) || \
|
||||
+ defined( HB_OS_HAIKU ) || \
|
||||
@@ -204,8 +214,8 @@ diff -urN minizip.orig/ioapi.h minizip/ioapi.h
|
||||
#define fopen64 fopen
|
||||
#define ftello64 ftell
|
||||
diff -urN minizip.orig/unzip.c minizip/unzip.c
|
||||
--- minizip.orig/unzip.c 2010-07-16 00:52:07.040236336 +0200
|
||||
+++ minizip/unzip.c 2010-07-16 00:52:07.040236336 +0200
|
||||
--- minizip.orig/unzip.c 2010-07-16 15:11:30.870234454 +0200
|
||||
+++ minizip/unzip.c 2010-07-16 15:11:30.870234454 +0200
|
||||
@@ -68,13 +68,17 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -293,8 +303,8 @@ diff -urN minizip.orig/unzip.c minizip/unzip.c
|
||||
pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
|
||||
pfile_in_zip_read_info->crc32=0;
|
||||
diff -urN minizip.orig/zip.c minizip/zip.c
|
||||
--- minizip.orig/zip.c 2010-07-16 00:52:07.100236615 +0200
|
||||
+++ minizip/zip.c 2010-07-16 00:52:07.100236615 +0200
|
||||
--- minizip.orig/zip.c 2010-07-16 15:11:30.930234949 +0200
|
||||
+++ minizip/zip.c 2010-07-16 15:11:30.930234949 +0200
|
||||
@@ -29,16 +29,20 @@
|
||||
#include "zlib.h"
|
||||
#include "zip.h"
|
||||
|
||||
@@ -2700,14 +2700,8 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
IF hbmk[ _HBMK_lDEBUG ]
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-g" )
|
||||
ENDIF
|
||||
IF hbmk[ _HBMK_cPLAT ] == "vxworks" .AND. ;
|
||||
Empty( hbmk[ _HBMK_cCCPOSTFIX ] )
|
||||
SWITCH hbmk[ _HBMK_cCPU ]
|
||||
CASE "x86" ; hbmk[ _HBMK_cCCPOSTFIX ] := "pentium" ; EXIT
|
||||
CASE "arm" ; hbmk[ _HBMK_cCCPOSTFIX ] := "arm" ; EXIT
|
||||
CASE "mips" ; hbmk[ _HBMK_cCCPOSTFIX ] := "mips" ; EXIT
|
||||
CASE "ppc" ; hbmk[ _HBMK_cCCPOSTFIX ] := "ppc" ; EXIT
|
||||
ENDSWITCH
|
||||
IF hbmk[ _HBMK_cPLAT ] == "vxworks"
|
||||
vxworks_env_init( hbmk )
|
||||
ENDIF
|
||||
cLibLibPrefix := "lib"
|
||||
cLibPrefix := "-l"
|
||||
@@ -2775,19 +2769,6 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-fno-strict-aliasing" )
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-D_C99" )
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-D_HAS_C9X" )
|
||||
SWITCH hbmk[ _HBMK_cCPU ]
|
||||
CASE "x86" ; tmp := "simpentium/SIMPENTIUM" ; EXIT
|
||||
CASE "arm" ; tmp := "arm/ARMARCH7" ; EXIT
|
||||
OTHERWISE
|
||||
tmp := NIL
|
||||
ENDSWITCH
|
||||
IF tmp != NIL
|
||||
IF hbmk[ _HBMK_lCreateDyn ]
|
||||
AAdd( hbmk[ _HBMK_aLIBPATH ], PathSepToSelf( GetEnv( "WIND_BASE" ) + "/target/lib/usr/lib/" + tmp + "/common/PIC" ) )
|
||||
ELSE
|
||||
AAdd( hbmk[ _HBMK_aLIBPATH ], PathSepToSelf( GetEnv( "WIND_BASE" ) + "/target/lib/usr/lib/" + tmp + "/common" ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
cOpt_CompC += " {FC}"
|
||||
IF ! Empty( hbmk[ _HBMK_cWorkDir ] )
|
||||
@@ -2843,9 +2824,18 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
AAdd( hbmk[ _HBMK_aOPTL ], "-bind_at_load" )
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF hbmk[ _HBMK_cPLAT ] == "vxworks"
|
||||
IF hbmk[ _HBMK_lSHARED ]
|
||||
AAdd( hbmk[ _HBMK_aOPTL ], "-shared" ) /* TOFIX: no entry point */
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF hbmk[ _HBMK_lSTRIP ]
|
||||
IF hbmk[ _HBMK_lCreateLib ] .OR. hbmk[ _HBMK_cPLAT ] $ "darwin|sunos"
|
||||
cBin_Post := "strip"
|
||||
IF hbmk[ _HBMK_cPLAT ] == "vxworks"
|
||||
cBin_Post := "strip" + hbmk[ _HBMK_cCCPOSTFIX ]
|
||||
ELSE
|
||||
cBin_Post := "strip"
|
||||
ENDIF
|
||||
IF hbmk[ _HBMK_lCreateDyn ] .OR. hbmk[ _HBMK_lCreateLib ]
|
||||
cOpt_Post := "-S {OB}"
|
||||
ELSE
|
||||
@@ -4040,7 +4030,106 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
CASE hbmk[ _HBMK_cPLAT ] == "vxworks" .AND. hbmk[ _HBMK_cCOMP ] == "diab"
|
||||
|
||||
/* TODO */
|
||||
#if defined( __PLATFORM__UNIX )
|
||||
hbmk[ _HBMK_nCmd_Esc ] := _ESC_NIX
|
||||
#elif defined( __PLATFORM__WINDOWS )
|
||||
hbmk[ _HBMK_nCmd_Esc ] := _ESC_DBLQUOTE
|
||||
#endif
|
||||
IF hbmk[ _HBMK_lDEBUG ]
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-g" )
|
||||
ENDIF
|
||||
vxworks_env_init( hbmk )
|
||||
cLibLibPrefix := "lib"
|
||||
cLibPrefix := "-l"
|
||||
cLibExt := ""
|
||||
cObjExt := ".o"
|
||||
cBin_Lib := hbmk[ _HBMK_cCCPREFIX ] + "dar"
|
||||
cOpt_Lib := "{FA} rcs {OL} {LO}"
|
||||
cBin_CompCPP := hbmk[ _HBMK_cCCPREFIX ] + "dplus"
|
||||
cBin_CompC := iif( hbmk[ _HBMK_lCPP ] != NIL .AND. hbmk[ _HBMK_lCPP ], cBin_CompCPP, hbmk[ _HBMK_cCCPREFIX ] + "dcc" )
|
||||
cOpt_CompC := "-c"
|
||||
IF hbmk[ _HBMK_lOPTIM ]
|
||||
cOpt_CompC += " -XO level-3"
|
||||
ENDIF
|
||||
tmp := "-WDVSB_DIR=" + PathSepToSelf( GetEnv( "WIND_BASE" ) + "/target/lib" )
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], tmp )
|
||||
AAdd( hbmk[ _HBMK_aOPTL ], tmp )
|
||||
AAdd( hbmk[ _HBMK_aOPTD ], tmp )
|
||||
SWITCH hbmk[ _HBMK_nWARN ]
|
||||
CASE _WARN_MAX ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Xlint" ) ; EXIT
|
||||
CASE _WARN_YES ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Xlint" ) ; EXIT
|
||||
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-W" ) ; EXIT
|
||||
CASE _WARN_NO ; AAdd( hbmk[ _HBMK_aOPTC ], "" ) ; EXIT
|
||||
ENDSWITCH
|
||||
cOpt_CompC += " {FC}"
|
||||
IF ! Empty( hbmk[ _HBMK_cWorkDir ] )
|
||||
cOpt_CompC += " {IC} -o {OO}"
|
||||
ELSE
|
||||
cOpt_CompC += " {LC}"
|
||||
ENDIF
|
||||
/* lib path list ({DL}) must precede lib list */
|
||||
cBin_Dyn := cBin_CompC
|
||||
cOpt_Dyn := "-Xpic -Wl, -Xshared -o {OD} {LO} {DL} {FD} {LS}"
|
||||
cBin_Link := cBin_CompC
|
||||
cOpt_Link := "{LO} {LA} {DL} {FL}"
|
||||
cLibPathPrefix := "-L"
|
||||
cLibPathSep := " "
|
||||
cLibLibExt := ".a"
|
||||
AAdd( hbmk[ _HBMK_aOPTL ], "{LL} {LB}" )
|
||||
AAdd( hbmk[ _HBMK_aOPTD ], "{LL} {LB}" )
|
||||
l_aLIBHBBASE_2 := iif( hbmk[ _HBMK_lMT ], aLIB_BASE_2_MT, aLIB_BASE_2 )
|
||||
IF hbmk[ _HBMK_lSTATICFULL ]
|
||||
AAdd( hbmk[ _HBMK_aOPTL ], "-Wl, -Xstatic" ) /* not tested */
|
||||
ELSE
|
||||
AAdd( hbmk[ _HBMK_aOPTD ], "-Wl, -Xdynamic" )
|
||||
ENDIF
|
||||
IF hbmk[ _HBMK_lSHARED ]
|
||||
/* TOFIX: .so is referred by it's full link time search path,
|
||||
there is even a backslash present in the dir formed by
|
||||
the linker */
|
||||
AAdd( hbmk[ _HBMK_aOPTL ], "-Wl, -Xdynamic" )
|
||||
ENDIF
|
||||
IF hbmk[ _HBMK_lMAP ]
|
||||
/* TODO: Map goes to stdout, we should ideally catch it to {OM} */
|
||||
AAdd( hbmk[ _HBMK_aOPTL ], "-m16" )
|
||||
AAdd( hbmk[ _HBMK_aOPTD ], "-m16" )
|
||||
ENDIF
|
||||
IF hbmk[ _HBMK_lSTRIP ]
|
||||
IF hbmk[ _HBMK_lCreateLib ]
|
||||
cBin_Post := "strip"
|
||||
IF hbmk[ _HBMK_lCreateDyn ] .OR. hbmk[ _HBMK_lCreateLib ]
|
||||
cOpt_Post := "-S {OB}"
|
||||
ELSE
|
||||
cOpt_Post := "{OB}"
|
||||
ENDIF
|
||||
ELSE
|
||||
AAdd( hbmk[ _HBMK_aOPTL ], "-s" )
|
||||
AAdd( hbmk[ _HBMK_aOPTD ], "-s" )
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF lStopAfterCComp
|
||||
IF ! hbmk[ _HBMK_lCreateLib ] .AND. ! hbmk[ _HBMK_lCreateDyn ] .AND. ( Len( hbmk[ _HBMK_aPRG ] ) + Len( hbmk[ _HBMK_aC ] ) + Len( hbmk[ _HBMK_aCPP ] ) ) == 1
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-o{OO}" )
|
||||
ENDIF
|
||||
ELSE
|
||||
AAdd( hbmk[ _HBMK_aOPTL ], "-o{OE}" )
|
||||
ENDIF
|
||||
|
||||
IF hbmk[ _HBMK_lCreateDyn ]
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-Xpic" )
|
||||
ENDIF
|
||||
|
||||
/* Add system libraries */
|
||||
IF ! hbmk[ _HBMK_lSHARED ]
|
||||
IF ! Empty( cLIB_BASE_PCRE ) .AND. ! hb_FileExists( _HBLIB_FULLPATH( cLIB_BASE_PCRE ) )
|
||||
AAdd( l_aLIBSYS, "pcre" )
|
||||
cLIB_BASE_PCRE := NIL
|
||||
ENDIF
|
||||
IF ! Empty( cLIB_BASE_ZLIB ) .AND. ! hb_FileExists( _HBLIB_FULLPATH( cLIB_BASE_ZLIB ) )
|
||||
AAdd( l_aLIBSYS, "z" )
|
||||
cLIB_BASE_ZLIB := NIL
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
ENDCASE
|
||||
|
||||
@@ -5650,6 +5739,49 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
RETURN hbmk[ _HBMK_nErrorLevel ]
|
||||
|
||||
STATIC PROCEDURE vxworks_env_init( hbmk )
|
||||
|
||||
/* Array positions for aTable */
|
||||
#define _VX_CCPOSTFIX 1
|
||||
#define _VX_DIAB_CPU 2
|
||||
#define _VX_CPU 3
|
||||
#define _VX_LIB_SUBDIR 4
|
||||
|
||||
#define _VX_DIAB_ENV "rtp"
|
||||
|
||||
/* Conversion table between hbmk2 CPU and vxworks values required to target that CPU */
|
||||
LOCAL aTable := {;
|
||||
"x86" => { "pentium", "X86LH" , "_VX_SIMPENTIUM", "simpentium/SIMPENTIUM" },;
|
||||
"arm" => { "arm" , "ARMV7LS", "_VX_ARMARCH7" , "arm/ARMARCH7" },;
|
||||
"mips" => { "mips" , "" , "" , "" },;
|
||||
"ppc" => { "ppc" , "" , "" , "" }}
|
||||
|
||||
IF hbmk[ _HBMK_cCPU ] $ aTable
|
||||
IF Empty( hbmk[ _HBMK_cCCPOSTFIX ] )
|
||||
/* Used by gcc, and it's also used for strip even with diab compiler */
|
||||
hbmk[ _HBMK_cCCPOSTFIX ] := aTable[ hbmk[ _HBMK_cCPU ] ][ _VX_CCPOSTFIX ]
|
||||
ENDIF
|
||||
IF hbmk[ _HBMK_cCOMP ] == "diab"
|
||||
IF ! Empty( aTable[ hbmk[ _HBMK_cCPU ] ][ _VX_DIAB_CPU ] )
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-t" + aTable[ hbmk[ _HBMK_cCPU ] ][ _VX_DIAB_CPU ] + ":" + _VX_DIAB_ENV )
|
||||
AAdd( hbmk[ _HBMK_aOPTL ], "-t" + aTable[ hbmk[ _HBMK_cCPU ] ][ _VX_DIAB_CPU ] + ":" + _VX_DIAB_ENV )
|
||||
AAdd( hbmk[ _HBMK_aOPTD ], "-t" + aTable[ hbmk[ _HBMK_cCPU ] ][ _VX_DIAB_CPU ] + ":" + _VX_DIAB_ENV )
|
||||
ENDIF
|
||||
IF ! Empty( aTable[ hbmk[ _HBMK_cCPU ] ][ _VX_CPU ] )
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], "-D_VX_CPU=" + aTable[ hbmk[ _HBMK_cCPU ] ][ _VX_CPU ] )
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF ! Empty( aTable[ hbmk[ _HBMK_cCPU ] ][ _VX_LIB_SUBDIR ] )
|
||||
IF hbmk[ _HBMK_lCreateDyn ]
|
||||
AAdd( hbmk[ _HBMK_aLIBPATH ], PathSepToSelf( GetEnv( "WIND_BASE" ) + "/target/lib/usr/lib/" + aTable[ hbmk[ _HBMK_cCPU ] ][ _VX_LIB_SUBDIR ] + "/common/PIC" ) )
|
||||
ELSE
|
||||
AAdd( hbmk[ _HBMK_aLIBPATH ], PathSepToSelf( GetEnv( "WIND_BASE" ) + "/target/lib/usr/lib/" + aTable[ hbmk[ _HBMK_cCPU ] ][ _VX_LIB_SUBDIR ] + "/common" ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
STATIC PROCEDURE DoIMPLIB( hbmk, bBlk_ImpLib, cLibLibPrefix, cLibLibExt )
|
||||
LOCAL cMakeImpLibDLL
|
||||
LOCAL tmp, tmp1
|
||||
|
||||
@@ -102,7 +102,8 @@ STATIC s_lDBFAvail := .F.
|
||||
PROCEDURE Main( cPar1, cPar2 )
|
||||
|
||||
OutStd( "Harbour Regression Test Suite" + HB_OSNewLine() +;
|
||||
"Copyright (c) 1999-2010, http://harbour-project.org/" + HB_OSNewLine() )
|
||||
"Copyright (c) 1999-2010, Viktor Szakats" + HB_OSNewLine() +;
|
||||
"http://harbour-project.org/" + HB_OSNewLine() )
|
||||
|
||||
IF cPar1 == NIL
|
||||
cPar1 := ""
|
||||
|
||||
Reference in New Issue
Block a user