From c7445e0bae1df37562720c01c245e7533a83dbc2 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 16 Jul 2010 06:11:26 +0000 Subject: [PATCH] 2010-07-16 08:10 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/common/hbver.c * Formatting. * config/vxworks/diab.mk ! Refined tweak added to make hbsocket compile. I overdid it, causing other breakage. ! Fixed dynlib generation to cope with Windows cmdline length limits. + Added proper dynlib generation rule. * config/vxworks/gcc.mk * config/vxworks/global.mk + HB_CCPOSTFIX setup made common to all compilers, because it's needed for 'strip' call. * utils/hbmk2/hbmk2.prg + Some vxworks environment setup made common to all compilers. * harbour-win-spec * harbour-wce-spec ! Deleted hbmk.hbc references. ; Patches by Tamas Tevesz: * harbour.spec ! Fixes to make it work. * external/minizip/minizip.dif * Updated. * INSTALL. * Nevermind. --- harbour/ChangeLog | 68 +++++++++++++++++++++------- harbour/INSTALL | 6 +-- harbour/config/vxworks/diab.mk | 26 ++++++++--- harbour/config/vxworks/gcc.mk | 22 ++------- harbour/config/vxworks/global.mk | 18 ++++++++ harbour/external/minizip/minizip.dif | 23 +++++----- harbour/harbour-wce-spec | 1 - harbour/harbour-win-spec | 1 - harbour/harbour.spec | 7 ++- harbour/src/common/hbver.c | 2 +- harbour/utils/hbmk2/hbmk2.prg | 14 +++--- 11 files changed, 120 insertions(+), 68 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 17798cdd43..d4e40b6c6f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,40 @@ The license applies to all entries newer than 2009-04-28. */ +2010-07-16 08:10 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/common/hbver.c + * Formatting. + + * config/vxworks/diab.mk + ! Refined tweak added to make hbsocket compile. I overdid + it, causing other breakage. + ! Fixed dynlib generation to cope with Windows cmdline + length limits. + + Added proper dynlib generation rule. + + * config/vxworks/gcc.mk + * config/vxworks/global.mk + + HB_CCPOSTFIX setup made common to all compilers, because + it's needed for 'strip' call. + + * utils/hbmk2/hbmk2.prg + + Some vxworks environment setup made common to all compilers. + + * harbour-win-spec + * harbour-wce-spec + ! Deleted hbmk.hbc references. + + ; Patches by Tamas Tevesz: + + * harbour.spec + ! Fixes to make it work. + + * external/minizip/minizip.dif + * Updated. + + * INSTALL. + * Nevermind. + 2010-07-15 18:54 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/doc/en/class_hbqplaintextedit.txt * contrib/hbqt/hbqt_hbqplaintextedit.cpp @@ -28,10 +62,10 @@ + contrib/hbide/plugins/hbide_script_rdds.prg + Added a dummy script to supply the required info - for different actions of an RDD operation if another - RDD is linked with hbIDE. DBFCDX and DBFNTX are + for different actions of an RDD operation if another + RDD is linked with hbIDE. DBFCDX and DBFNTX are linked by default. - To make this feature functional, this dummy script has + To make this feature functional, this dummy script has to be popiulated with real-time code and be copied inside "resources" folder with another name prefixed as: hbide_persist_myrdd.prg @@ -40,12 +74,12 @@ * contrib/hbide/hbide.prg * contrib/hbide/idebrowse.prg * contrib/hbide/ideplugins.prg - + Implemented: persistent record/order/rowpos/colpos - of ideDBU views. Now tables are opened in the same + + Implemented: persistent record/order/rowpos/colpos + of ideDBU views. Now tables are opened in the same state of last run. - + Totally reworked table-management engine. Now supports - external RDDs if linked which take effect automatically + + Totally reworked table-management engine. Now supports + external RDDs if linked which take effect automatically for database operations, i.e., /rdds/exists/select/open; more actions will follow. @@ -98,7 +132,7 @@ 2010-07-15 21:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL - ! vxWorks casing. + ! VxWorks casing. + Added vxworks/gcc/arm example. * utils/hbmk2/hbmk2.prg @@ -148,10 +182,10 @@ 2010-07-15 19:20 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbthread.h - ! Hacked around collision between vxWorks headers. + ! Hacked around collision between VxWorks headers. * ChangeLog - ! Fixed casing of vxWorks. + ! Fixed casing of VxWorks. * utils/hbmk2/hbmk2.prg + Added vxworks/gcc libpaths. @@ -187,7 +221,7 @@ * external/zlib/zlib.dif * external/jpeg/Makefile + external/jpeg/jpeg.dif - + Added/updated diffs after vxWorks changes. + + Added/updated diffs after VxWorks changes. Patch by Tamas Tevesz. Thanks! 2010-07-15 17:10 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) @@ -232,9 +266,9 @@ + config/vxworks/gcc.mk + config/vxworks/diab.mk + config/vxworks/global.mk - + Started experimental vxWorks port. - ; NOTE: vxWorks port was made possible by Wind River Systems Inc., - who were so kind to mail me a full vxWorks development + + Started experimental VxWorks port. + ; NOTE: VxWorks port was made possible by Wind River Systems Inc., + who were so kind to mail me a full VxWorks development environment, for the purpose of porting Harbour to this platform. Thank you very much guys. @@ -242,14 +276,14 @@ is interested in helping in this project, I can help with real tests, builds and information. BTW, the devenv is Eclipse based plus cmdline, running on Windows (available - for Linux and Solaris, too) and the target vxWorks exes + for Linux and Solaris, too) and the target VxWorks exes run in a virtual environment. ] * config/global.mk - + Added autodetection of vxWorks platform. + + Added autodetection of VxWorks platform. * utils/hbmk2/hbmk2.prg - + Added vxWorks support. It's incomplete yet. + + Added VxWorks support. It's incomplete yet. ! Fixed to quote *nix/gcc compiler family in Windows-host cross-platform situations. diff --git a/harbour/INSTALL b/harbour/INSTALL index b5602eaad5..da93f328bf 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -475,7 +475,7 @@ HARBOUR hpux - HP-UX sunos - Sun Solaris / OpenSolaris qnx - QNX - vxworks - vxWorks + vxworks - VxWorks win - MS Windows (all flavors) (see LINKS section for Win9x requirements) wce - MS Windows CE @@ -929,13 +929,13 @@ HARBOUR win-make --- - --- vxWorks 6.8 x86 (requires preceding build for Windows target) + --- VxWorks 6.8 x86 (requires preceding build for Windows target) wrenv -p vxworks-6.8 set HB_COMPILER=gcc win-make --- - --- vxWorks 6.8 ARM (requires preceding build for Windows target) + --- VxWorks 6.8 ARM (requires preceding build for Windows target) wrenv -p vxworks-6.8 set HB_COMPILER=gcc set HB_CPU=arm diff --git a/harbour/config/vxworks/diab.mk b/harbour/config/vxworks/diab.mk index 5b4b3711f2..c80965aad3 100644 --- a/harbour/config/vxworks/diab.mk +++ b/harbour/config/vxworks/diab.mk @@ -50,15 +50,16 @@ CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP) CC_IN := -c CC_OUT := -o -CFLAGS += -I. -I$(HB_INC_COMPILE) -CFLAGS += -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip - -CFLAGS += -D_VX_CPU=$(_DIAB_VXCPU) - CFLAGS += -t$(_DIAB_CPU):rtpsim -WDVSB_DIR=$(WIND_BASE)/target/lib LDFLAGS += -t$(_DIAB_CPU):rtpsim -WDVSB_DIR=$(WIND_BASE)/target/lib DFLAGS += -t$(_DIAB_CPU):rtpsim -WDVSB_DIR=$(WIND_BASE)/target/lib +CFLAGS += -I. -I$(HB_INC_COMPILE) +CFLAGS += -I$(WIND_BASE)/target/usr/h +CFLAGS += -I$(WIND_BASE)/target/usr/h/wrn/coreip +CFLAGS += -D_VX_CPU=$(_DIAB_VXCPU) +#CFLAGS += -D_VX_TOOL_FAMILY=diab -D_VX_TOOL=diab + ifneq ($(HB_BUILD_WARN),no) CFLAGS += -W -Xlint else @@ -87,10 +88,21 @@ AR := $(HB_CCPREFIX)dar AR_RULE = ( $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ $(^F) $(ARSTRIP) ) || ( $(RM) $(LIB_DIR)/$@ && $(FALSE) ) DY := $(CC) -DFLAGS += -shared $(DLIBPATHS) +DFLAGS += -Xpic -Wl, -Xshared -Wl, -Xdynamic $(DLIBPATHS) DY_OUT := -o$(subst x,x, ) DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS_DYN),-l$(lib)) -DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2) +# NOTE: The empty line directly before 'endef' HAVE TO exist! +define dynlib_object + @$(ECHO) $(ECHOQUOTE)$(subst \,/,$(file))$(ECHOQUOTE) >> __dyn__.tmp + +endef +define create_dynlib + $(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,) + $(foreach file,$^,$(dynlib_object)) + $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ -@__dyn__.tmp $(DLIBS) $(DYSTRIP) +endef + +DY_RULE = $(create_dynlib) include $(TOP)$(ROOT)config/rules.mk diff --git a/harbour/config/vxworks/gcc.mk b/harbour/config/vxworks/gcc.mk index 24a5fa14b1..15266b3ce6 100644 --- a/harbour/config/vxworks/gcc.mk +++ b/harbour/config/vxworks/gcc.mk @@ -16,24 +16,6 @@ LIB_EXT := .a HB_DYN_COPT := -DHB_DYNLIB -fpic -ifeq ($(HB_CCPOSTFIX),) - ifeq ($(HB_CPU),x86) - export HB_CCPOSTFIX := pentium - else - ifeq ($(HB_CPU),arm) - export HB_CCPOSTFIX := arm - else - ifeq ($(HB_CPU),mips) - export HB_CCPOSTFIX := mips - else - ifeq ($(HB_CPU),ppc) - export HB_CCPOSTFIX := ppc - endif - endif - endif - endif -endif - CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX) CC_IN := -c CC_OUT := -o @@ -43,9 +25,11 @@ LDFLAGS += -mrtp DFLAGS += -mrtp CFLAGS += -I. -I$(HB_INC_COMPILE) -CFLAGS += -I$(WIND_USR)/h -I$(WIND_USR)/h/wrn/coreip +CFLAGS += -I$(WIND_BASE)/target/usr/h +CFLAGS += -I$(WIND_BASE)/target/usr/h/wrn/coreip CFLAGS += -fno-strict-aliasing CFLAGS += -D_C99 -D_HAS_C9X +#CFLAGS += -D_VX_TOOL_FAMILY=gnu -D_VX_TOOL=gnu ifneq ($(HB_BUILD_WARN),no) CFLAGS += -W -Wall diff --git a/harbour/config/vxworks/global.mk b/harbour/config/vxworks/global.mk index 366bf4248c..2cc88ed2f9 100644 --- a/harbour/config/vxworks/global.mk +++ b/harbour/config/vxworks/global.mk @@ -8,6 +8,24 @@ BIN_EXT := .vxe DYN_EXT := .so DYN_PREF := lib +ifeq ($(HB_CCPOSTFIX),) + ifeq ($(HB_CPU),x86) + export HB_CCPOSTFIX := pentium + else + ifeq ($(HB_CPU),arm) + export HB_CCPOSTFIX := arm + else + ifeq ($(HB_CPU),mips) + export HB_CCPOSTFIX := mips + else + ifeq ($(HB_CPU),ppc) + export HB_CCPOSTFIX := ppc + endif + endif + endif + endif +endif + ifneq ($(filter $(HB_BUILD_STRIP),all lib),) ARSTRIP = && strip$(HB_CCPOSTFIX) $(LIB_DIR)/$@ endif diff --git a/harbour/external/minizip/minizip.dif b/harbour/external/minizip/minizip.dif index 4f461126a1..cf380354dc 100644 --- a/harbour/external/minizip/minizip.dif +++ b/harbour/external/minizip/minizip.dif @@ -1,6 +1,6 @@ diff -urN minizip.orig/crypt.h minizip/crypt.h ---- minizip.orig/crypt.h 2009-10-25 22:49:58.000000000 +0100 -+++ minizip/crypt.h 2010-06-10 20:03:37.090218606 +0200 +--- minizip.orig/crypt.h 2010-07-16 00:52:06.960236990 +0200 ++++ minizip/crypt.h 2010-07-16 00:52:06.970234708 +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-01-04 10:31:24.000000000 +0100 -+++ minizip/ioapi.c 2010-06-10 20:03:37.090218606 +0200 +--- minizip.orig/ioapi.c 2010-07-16 00:52:06.980235219 +0200 ++++ minizip/ioapi.c 2010-07-16 00:52:06.980235219 +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-02-15 04:59:40.000000000 +0100 -+++ minizip/ioapi.h 2010-06-14 20:35:11.840218016 +0200 -@@ -21,29 +21,39 @@ +--- 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 @@ #ifndef _ZLIBIOAPI64_H #define _ZLIBIOAPI64_H @@ -192,6 +192,7 @@ diff -urN minizip.orig/ioapi.h minizip/ioapi.h +#if defined( __BORLANDC__ ) || \ + defined( __WATCOMC__ ) || \ + defined( __MINGW32CE__ ) || \ ++ defined( __DCC__ ) || \ + defined( HB_OS_BSD ) || \ + defined( HB_OS_DARWIN ) || \ + defined( HB_OS_HAIKU ) || \ @@ -203,8 +204,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-02-15 04:59:40.000000000 +0100 -+++ minizip/unzip.c 2010-06-10 20:04:53.082307519 +0200 +--- minizip.orig/unzip.c 2010-07-16 00:52:07.040236336 +0200 ++++ minizip/unzip.c 2010-07-16 00:52:07.040236336 +0200 @@ -68,13 +68,17 @@ #include #include @@ -292,8 +293,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-02-15 04:59:40.000000000 +0100 -+++ minizip/zip.c 2010-06-10 20:05:03.170219908 +0200 +--- minizip.orig/zip.c 2010-07-16 00:52:07.100236615 +0200 ++++ minizip/zip.c 2010-07-16 00:52:07.100236615 +0200 @@ -29,16 +29,20 @@ #include "zlib.h" #include "zip.h" diff --git a/harbour/harbour-wce-spec b/harbour/harbour-wce-spec index 00fe449611..d5415b5f49 100644 --- a/harbour/harbour-wce-spec +++ b/harbour/harbour-wce-spec @@ -127,7 +127,6 @@ make install %{?_smp_mflags} # remove unused files rm -fR ${HB_BIN_INSTALL}/{harbour,hbpp,hbmk2,hbrun,hbi18n,hbtest}.exe -rm -fR ${HB_BIN_INSTALL}/hbmk.hbc # Create a README file for people using this RPM. cat > doc/%{readme} < doc/%{readme} < "(trunk 103176)" */ hb_snprintf( szSub, sizeof( szSub ), " %s", strstr( __clang_version__, "(" ) ); else diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 1b7380bc9d..697bb932a5 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -1505,10 +1505,9 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause ) hbmk[ _HBMK_cCPU ] := hbmk_CPU( hbmk ) ENDIF - /* Tweaks to compiler environments */ + /* Tweaks to compiler/platform environments */ - DO CASE - CASE hbmk[ _HBMK_cCOMP ] == "bcc" + IF hbmk[ _HBMK_cCOMP ] == "bcc" /* NOTE: Hack to tweak bcc setup by hbmk2 to include one additional compiler lib dir to lib search path. */ IF Empty( cPath_CompC ) @@ -1529,7 +1528,12 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause ) ENDIF AAdd( hbmk[ _HBMK_aLIBPATH ], PathNormalize( FNameDirGet( cPath_CompC ) + ".." + hb_ps() + "Lib" + hb_ps() + "PSDK" ) ) ENDIF - ENDCASE + ENDIF + + IF hbmk[ _HBMK_cPLAT ] == "vxworks" + AAdd( hbmk[ _HBMK_aINCPATH ], PathSepToSelf( GetEnv( "WIND_BASE" ) + "/target/usr/h" ) ) + AAdd( hbmk[ _HBMK_aINCPATH ], PathSepToSelf( GetEnv( "WIND_BASE" ) + "/target/usr/h/wrn/coreip" ) ) + ENDIF /* Tweaks to compiler setup */ @@ -2771,8 +2775,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" ) - AAdd( hbmk[ _HBMK_aINCPATH ], PathSepToSelf( GetEnv( "WIND_USR" ) + "/h" ) ) - AAdd( hbmk[ _HBMK_aINCPATH ], PathSepToSelf( GetEnv( "WIND_USR" ) + "/h/wrn/coreip" ) ) SWITCH hbmk[ _HBMK_cCPU ] CASE "x86" ; tmp := "simpentium/SIMPENTIUM" ; EXIT CASE "arm" ; tmp := "arm/ARMARCH7" ; EXIT