From 83c7f46c13d552f3a2219fbc3c8dc64b48dbf333 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 15 Jul 2010 19:53:56 +0000 Subject: [PATCH] 2010-07-15 21:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL ! vxWorks casing. + Added vxworks/gcc/arm example. * utils/hbmk2/hbmk2.prg % -DARMEL no more defined for vxworks/gcc/arm. It turns out it's a predefined macro. * config/global.mk ! Fixed HB_CPU autodetection after prev change. * INSTALL ; NOTE: After previous change HB_CCPOSTINST is automatically set on vxworks/gcc. * config/vxworks/libs.mk * config/vxworks/gcc.mk + Tried to enable dynlibhb, didn't succeed, see comments. * config/vxworks/gcc.mk % Deleted unnecessary compile time macros. ; TOFIX: vxworks HB_BUILD_SHARED=yes is broken. harbour .so is not found. Couldn't find out why. ; TOFIX: vxworks/gcc/arm hbatomic.h needs support added. arm harbour and hbpp builds fine. --- harbour/ChangeLog | 28 ++++++++++++++++++++++++++++ harbour/INSTALL | 12 +++++++++--- harbour/config/global.mk | 2 -- harbour/config/vxworks/gcc.mk | 6 ++---- harbour/config/vxworks/libs.mk | 6 ++++++ harbour/utils/hbmk2/hbmk2.prg | 3 --- 6 files changed, 45 insertions(+), 12 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6c63c18bbf..eff4cd052b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,34 @@ The license applies to all entries newer than 2009-04-28. */ +2010-07-15 21:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * INSTALL + ! vxWorks casing. + + Added vxworks/gcc/arm example. + + * utils/hbmk2/hbmk2.prg + % -DARMEL no more defined for vxworks/gcc/arm. It turns + out it's a predefined macro. + + * config/global.mk + ! Fixed HB_CPU autodetection after prev change. + + * INSTALL + ; NOTE: After previous change HB_CCPOSTINST is automatically + set on vxworks/gcc. + + * config/vxworks/libs.mk + * config/vxworks/gcc.mk + + Tried to enable dynlibhb, didn't succeed, see comments. + + * config/vxworks/gcc.mk + % Deleted unnecessary compile time macros. + + ; TOFIX: vxworks HB_BUILD_SHARED=yes is broken. harbour .so + is not found. Couldn't find out why. + ; TOFIX: vxworks/gcc/arm hbatomic.h needs support added. + arm harbour and hbpp builds fine. + 2010-07-15 20:24 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg + Added experimental -cpu option. (not at the level diff --git a/harbour/INSTALL b/harbour/INSTALL index 51ab8a3499..b3a6d1c0ad 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,10 +929,16 @@ HARBOUR win-make --- - --- VxWorks 6.8 (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 - set HB_CCPOSTFIX=pentium + win-make + --- + + --- vxWorks 6.8 ARM (requires preceding build for Windows target) + wrenv -p vxworks-6.8 + set HB_COMPILER=gcc + set HB_CPU=arm win-make --- diff --git a/harbour/config/global.mk b/harbour/config/global.mk index 158a46f200..4f400bb0f9 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -556,8 +556,6 @@ ifeq ($(HB_PLATFORM),) endif endif -HB_CPU := - HB_COMP_AUTO := HB_COMP_PATH := ifeq ($(HB_COMPILER),) diff --git a/harbour/config/vxworks/gcc.mk b/harbour/config/vxworks/gcc.mk index 1b9ac686e6..c3d37c92e5 100644 --- a/harbour/config/vxworks/gcc.mk +++ b/harbour/config/vxworks/gcc.mk @@ -17,13 +17,11 @@ LIB_EXT := .a HB_DYN_COPT := -DHB_DYNLIB -fpic ifeq ($(HB_CPU),x86) - CFLAGS += -D_VX_CPU=_VX_SIMPENTIUM ifeq ($(HB_CCPOSTFIX),) export HB_CCPOSTFIX := pentium endif else ifeq ($(HB_CPU),arm) - CFLAGS += -DARMEL -D_VX_ARMARCH7 ifeq ($(HB_CCPOSTFIX),) export HB_CCPOSTFIX := arm endif @@ -64,7 +62,7 @@ LD_OUT := -o LDLIBPATHS := $(foreach dir,$(LIB_DIR) $(SYSLIBPATHS_BIN),-L$(dir)) DLIBPATHS := $(foreach dir,$(LIB_DIR) $(SYSLIBPATHS_DYN),-L$(dir)) -LDLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),-l$(lib)) +LDLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS_BIN),-l$(lib)) LDFLAGS += $(LDLIBPATHS) @@ -74,7 +72,7 @@ AR_RULE = ( $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ $( DY := $(CC) DFLAGS += -shared $(DLIBPATHS) DY_OUT := -o$(subst x,x, ) -DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS),-l$(lib)) +DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS_DYN),-l$(lib)) # NOTE: The empty line directly before 'endef' HAVE TO exist! define dynlib_object diff --git a/harbour/config/vxworks/libs.mk b/harbour/config/vxworks/libs.mk index fef57c21f3..53f67d0d77 100644 --- a/harbour/config/vxworks/libs.mk +++ b/harbour/config/vxworks/libs.mk @@ -13,3 +13,9 @@ ifeq ($(HB_CPU),arm) SYSLIBPATHS_DYN := $(WIND_BASE)/target/lib/usr/lib/arm/ARMARCH7/common/PIC endif endif + +# For support. I couldn't make it work though. +# The lib is missing from PIC dir, so it can only work +# for static targets, but even then, various tls symbols +# are missing. +#SYSLIBS_BIN += dl diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 0547e5505a..e541b53d5b 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -2755,9 +2755,6 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause ) 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" ) ) - IF hbmk[ _HBMK_cCPU ] == "arm" - AAdd( hbmk[ _HBMK_aOPTC ], "-DARMEL" ) - ENDIF SWITCH hbmk[ _HBMK_cCPU ] CASE "x86" ; tmp := "simpentium/SIMPENTIUM" ; EXIT CASE "arm" ; tmp := "arm/ARMARCH7" ; EXIT