From 64f537a370f6b195cb499fb62f58d9ba65e17edc Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 17 Jul 2010 15:10:48 +0000 Subject: [PATCH] 2010-07-17 17:10 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * ChangeLog * src/vm/dynlibhb.c * config/vxworks/libs.mk + Documented fact that VxWorks only supports dlopen() in shared executables. I can see no way how Harbour could support this. * config/vxworks/gcc.mk * config/vxworks/diab.mk * Minor cleanups to HB_BUILD_SHARED mode. --- harbour/ChangeLog | 15 ++++++++++++++- harbour/config/vxworks/diab.mk | 2 +- harbour/config/vxworks/gcc.mk | 2 +- harbour/config/vxworks/libs.mk | 6 ------ harbour/src/vm/dynlibhb.c | 2 ++ 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a7bba6b8c0..30f2d0292e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,18 @@ The license applies to all entries newer than 2009-04-28. */ +2010-07-17 17:10 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * ChangeLog + * src/vm/dynlibhb.c + * config/vxworks/libs.mk + + Documented fact that VxWorks only supports dlopen() in + shared executables. I can see no way how Harbour could + support this. + + * config/vxworks/gcc.mk + * config/vxworks/diab.mk + * Minor cleanups to HB_BUILD_SHARED mode. + 2010-07-17 16:28 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbodbc/todbc.prg * contrib/hbodbc/odbcold.c @@ -233,7 +245,8 @@ 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. + walls here. [CLOSED: VxWorks support dlopen() only in shared + executables. For static executables it fails at link time.] - 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. diff --git a/harbour/config/vxworks/diab.mk b/harbour/config/vxworks/diab.mk index 4fdd4f3135..c5d9f043c2 100644 --- a/harbour/config/vxworks/diab.mk +++ b/harbour/config/vxworks/diab.mk @@ -77,7 +77,7 @@ 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) - LDFLAGS += -Wl, -Xdynamic + LDFLAGS += -Xdynamic -Wl,-rpath /romfs/lib endif LDFLAGS += $(LDLIBPATHS) diff --git a/harbour/config/vxworks/gcc.mk b/harbour/config/vxworks/gcc.mk index 00cd159da0..9c454f1ff9 100644 --- a/harbour/config/vxworks/gcc.mk +++ b/harbour/config/vxworks/gcc.mk @@ -55,7 +55,7 @@ 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) - LDFLAGS += -non-static + LDFLAGS += -non-static -Wl,-rpath=/romfs/lib endif LDFLAGS += $(LDLIBPATHS) diff --git a/harbour/config/vxworks/libs.mk b/harbour/config/vxworks/libs.mk index 53f67d0d77..fef57c21f3 100644 --- a/harbour/config/vxworks/libs.mk +++ b/harbour/config/vxworks/libs.mk @@ -13,9 +13,3 @@ 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/src/vm/dynlibhb.c b/harbour/src/vm/dynlibhb.c index ef505c6749..1834ae85f1 100644 --- a/harbour/src/vm/dynlibhb.c +++ b/harbour/src/vm/dynlibhb.c @@ -76,6 +76,8 @@ # include #endif +/* NOTE: VxWorks supports dlopen() functionality only in shared + executables. [vszakats] */ #if !defined( HB_HAS_DLFCN ) && \ ( ( defined( HB_OS_LINUX ) && !defined( __WATCOMC__ ) ) || \ defined( HB_OS_SUNOS ) || defined( HB_OS_DARWIN ) || \