[kaffe] CVS kaffe (alex): - slib.h - add DROPS/L4Env specific header file in order to support dynamic shar
Kaffe CVS
cvs-commits at kaffe.org
Thu Dec 1 15:58:13 PST 2005
PatchSet 6979
Date: 2005/12/01 23:50:53
Author: alex
Branch: HEAD
Tag: (none)
Log:
- slib.h - add DROPS/L4Env specific header file in order to support dynamic shared libraries
- add DROPS as OS in config.subs in order to enable cross configuration and compiling
- changes in autogen.sh and 3 patch files & config.sub modifications
Members:
ChangeLog:1.4501->1.4502
configure:1.507->1.508
developers/autogen.sh:1.63->1.64
developers/config1.patch:INITIAL->1.1
developers/config2.patch:INITIAL->1.1
developers/config3.patch:INITIAL->1.1
kaffe/kaffevm/slib.h:INITIAL->1.10
libltdl/config.sub:1.17->1.18
scripts/config.sub:1.12->1.13
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4501 kaffe/ChangeLog:1.4502
--- kaffe/ChangeLog:1.4501 Tue Nov 29 21:14:55 2005
+++ kaffe/ChangeLog Thu Dec 1 23:50:53 2005
@@ -1,3 +1,21 @@
+2005-12-02 Alexander Boettcher <alex at kaffe.org>
+
+ * configure: add thread binding drops-l4threads
+ * developers/config1.patch,
+ developers/config2.patch,
+ developers/config3.patch: new - DROPS patches of config.subs in
+ scripts, libltdl and libraries/javalib/external/classpath
+ * developers/autogen.sh: add configX.patch files (X=1..3)
+ * scripts/config.sub,
+ libltdl/config.sub,
+ libraries/javalib/external/classpath/config.sub: patched by
+ configX.patch (X=1..3) in order to enable cross compiling for OS DROPS
+
+ * kaffe/kaffevm/slib.h: include DROPS/L4Env specific header file (located at
+ kaffe/kaffevm/systems/drops-l4threads/l4_loader.h), this enables the
+ look up of symbols in shared libraries by the DROPS loader/exec
+ service
+
2005-11-29 Guilhem Lavaux <guilhem at kaffe.org>
* libraries/javalib/gmp-math/java/math/BigInteger.java
Index: kaffe/configure
diff -u kaffe/configure:1.507 kaffe/configure:1.508
--- kaffe/configure:1.507 Fri Nov 4 20:23:41 2005
+++ kaffe/configure Thu Dec 1 23:50:55 2005
@@ -49259,6 +49259,8 @@
ac_config_files="$ac_config_files kaffe/kaffevm/systems/oskit-pthreads/Makefile"
+ ac_config_files="$ac_config_files kaffe/kaffevm/systems/drops-l4threads/Makefile"
+
ac_config_files="$ac_config_files kaffe/kaffevm/systems/beos-native/Makefile"
ac_config_files="$ac_config_files kaffe/kaffevm/systems/unix-pthreads/Makefile"
@@ -50213,6 +50215,7 @@
"kaffe/kaffevm/systems/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffevm/systems/Makefile" ;;
"kaffe/kaffevm/systems/unix-jthreads/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffevm/systems/unix-jthreads/Makefile" ;;
"kaffe/kaffevm/systems/oskit-pthreads/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffevm/systems/oskit-pthreads/Makefile" ;;
+ "kaffe/kaffevm/systems/drops-l4threads/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffevm/systems/drops-l4threads/Makefile" ;;
"kaffe/kaffevm/systems/beos-native/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffevm/systems/beos-native/Makefile" ;;
"kaffe/kaffevm/systems/unix-pthreads/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffevm/systems/unix-pthreads/Makefile" ;;
"kaffe/kaffevm/verifier/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffevm/verifier/Makefile" ;;
Index: kaffe/developers/autogen.sh
diff -u kaffe/developers/autogen.sh:1.63 kaffe/developers/autogen.sh:1.64
--- kaffe/developers/autogen.sh:1.63 Sat Oct 22 10:08:15 2005
+++ kaffe/developers/autogen.sh Thu Dec 1 23:51:05 2005
@@ -146,3 +146,19 @@
autoreconf -i # -Wall
)
+
+# drops specific patches
+(
+ cd scripts
+ patch -p0 <../developers/config1.patch
+)
+
+(
+ cd libltdl
+ patch -p0 <../developers/config2.patch
+)
+
+(
+ cd libraries/javalib/external/classpath
+ patch -p0 <../../../../developers/config3.patch
+)
===================================================================
Checking out kaffe/developers/config1.patch
RCS: /home/cvs/kaffe/kaffe/developers/config1.patch,v
VERS: 1.1
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/developers/config1.patch Thu Dec 1 23:58:12 2005
@@ -0,0 +1,17 @@
+Index: config.sub
+===================================================================
+RCS file: /cvs/kaffe/kaffe/scripts/config.sub,v
+retrieving revision 1.12
+diff -u -r1.12 config.sub
+--- config.sub 25 Oct 2005 15:44:00 -0000 1.12
++++ config.sub 1 Dec 2005 21:55:38 -0000
+@@ -1315,6 +1315,9 @@
+ -kaos*)
+ os=-kaos
+ ;;
++ -*drops)
++ os=-drops
++ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
===================================================================
Checking out kaffe/developers/config2.patch
RCS: /home/cvs/kaffe/kaffe/developers/config2.patch,v
VERS: 1.1
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/developers/config2.patch Thu Dec 1 23:58:12 2005
@@ -0,0 +1,17 @@
+Index: config.sub
+===================================================================
+RCS file: /cvs/kaffe/kaffe/libltdl/config.sub,v
+retrieving revision 1.17
+diff -u -r1.17 config.sub
+--- config.sub 25 Oct 2005 15:43:20 -0000 1.17
++++ config.sub 1 Dec 2005 23:06:41 -0000
+@@ -1309,6 +1309,9 @@
+ -kaos*)
+ os=-kaos
+ ;;
++ -*drops)
++ os=-drops
++ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
===================================================================
Checking out kaffe/developers/config3.patch
RCS: /home/cvs/kaffe/kaffe/developers/config3.patch,v
VERS: 1.1
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/developers/config3.patch Thu Dec 1 23:58:12 2005
@@ -0,0 +1,17 @@
+Index: config.sub
+===================================================================
+RCS file: /cvs/kaffe/kaffe/libraries/javalib/external/classpath/config.sub,v
+retrieving revision 1.3
+diff -u -r1.3 config.sub
+--- config.sub 25 Oct 2005 15:43:48 -0000 1.3
++++ config.sub 1 Dec 2005 21:18:58 -0000
+@@ -1309,6 +1309,9 @@
+ -kaos*)
+ os=-kaos
+ ;;
++ -*drops)
++ os=-drops
++ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
===================================================================
Checking out kaffe/kaffe/kaffevm/slib.h
RCS: /home/cvs/kaffe/kaffe/kaffe/kaffevm/slib.h,v
VERS: 1.10
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/kaffe/kaffevm/slib.h Thu Dec 1 23:58:13 2005
@@ -0,0 +1,156 @@
+/* slib.h
+ * Macro'ise the shared library calls to be 'portable'.
+ *
+ * Copyright (c) 1996, 1997
+ * Transvirtual Technologies, Inc. All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+
+#ifndef __slib_h
+#define __slib_h
+
+/* ------------------------------------------------------------------------ */
+
+/*
+ * DROPS/L4Env loader shared library interface.
+ */
+#if defined(DROPS_SHARED_LIBRARIES)
+ #include <l4_loader.h>
+#endif
+
+/*
+ * MACH style shared library interface.
+ */
+#if defined(HAVE_MACH_O_RLD_H)
+#if defined(__APPLE__)
+
+#if defined(HAVE_DLFCN_H)
+ /* Mac OS X has rld.h, but we don't want to use it if the dlcompat
+ package from the Fink project is installed. */
+#include <dlfcn.h>
+#else
+#error Please install dlcompat library from Fink project
+#endif
+
+#else
+
+#include <mach-o/rld.h>
+
+#define LIBRARYHANDLE long
+
+static inline void
+KaffeLib_Init(void)
+{
+}
+
+#if !defined(NeXT)
+static inline long
+KaffeLib_Load(const char *libname)
+{
+ const char* filenames[2];
+ struct mach_header* new_header;
+
+ filenames[0]=libname;
+ filenames[1]=NULL;
+ return rld_load(NULL,&new_header,filenames,NULL);
+}
+#else
+/*
+ * The following is for the NeXTStep - I don't like putting this kind
+ * of system dependency here and I'll find an auto way to detect this
+ * later.
+ */
+static inline long
+KaffeLib_Load(const char *libname)
+{
+ const char* filenames[2];
+ long libhandle;
+
+ NXStream* errorStream;
+ filenames[0] = libname;
+ filenames[1] = NULL;
+ errorStream = NXOpenMemory(NULL, 0, NX_WRITEONLY);
+ libhandle = !objc_loadModules(filenames,errorStream,NULL,NULL,NULL);
+ if (!libhandle) {
+ char* streamBuf;
+ int len, maxLen;
+ NXPutc(errorStream, (char)0);
+ NXGetMemoryBuffer(errorStream, &streamBuf, &len, &maxLen);
+ printf("LIBRARYLOAD(\"%s\") error: %s\n", libname,
+ streamBuf);
+ }
+ return libhandle;
+}
+
+static inline void
+KaffeLib_Unload(long handle)
+{
+}
+
+#endif
+
+static inline void *
+KaffeLib_GetSymbol(long handle, const char *symname)
+{
+ void *func;
+
+ rld_lookup(handle, symname, &func);
+ return func;
+}
+
+static inline const char *
+KaffeLib_GetError(void)
+{
+ return "No specific error support";
+}
+
+#endif
+#endif
+
+/* ------------------------------------------------------------------------ */
+
+#ifndef LIBRARYHANDLE
+
+#define LT_NON_POSIX_NAMESPACE
+#include "ltdl.h"
+
+#define LIBRARYHANDLE lt_dlhandle
+
+static inline void
+KaffeLib_Init(void)
+{
+ lt_dlinit();
+}
+
+static inline lt_dlhandle
+KaffeLib_Load(const char *libname)
+{
+ return lt_dlopenext(libname);
+}
+
+static inline void
+KaffeLib_Unload(lt_dlhandle handle)
+{
+ lt_dlclose(handle);
+}
+
+static inline void *
+KaffeLib_GetSymbol(lt_dlhandle handle,
+ const char *symname)
+{
+ return lt_dlsym(handle, symname);
+}
+
+static inline const char *
+KaffeLib_GetError(void)
+{
+ return lt_dlerror();
+}
+
+#endif
+
+/* ------------------------------------------------------------------------ */
+
+#endif
Index: kaffe/libltdl/config.sub
diff -u kaffe/libltdl/config.sub:1.17 kaffe/libltdl/config.sub:1.18
--- kaffe/libltdl/config.sub:1.17 Tue Oct 25 15:43:20 2005
+++ kaffe/libltdl/config.sub Thu Dec 1 23:51:06 2005
@@ -1309,6 +1309,9 @@
-kaos*)
os=-kaos
;;
+ -*drops)
+ os=-drops
+ ;;
-zvmoe)
os=-zvmoe
;;
Index: kaffe/scripts/config.sub
diff -u kaffe/scripts/config.sub:1.12 kaffe/scripts/config.sub:1.13
--- kaffe/scripts/config.sub:1.12 Tue Oct 25 15:44:00 2005
+++ kaffe/scripts/config.sub Thu Dec 1 23:51:06 2005
@@ -1315,6 +1315,9 @@
-kaos*)
os=-kaos
;;
+ -*drops)
+ os=-drops
+ ;;
-zvmoe)
os=-zvmoe
;;
More information about the kaffe
mailing list