[cmucl-commit] [git] CMU Common Lisp branch master updated. 20f-31-g57711cc

Raymond Toy rtoy at common-lisp.net
Thu Oct 9 00:44:12 UTC 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".

The branch, master has been updated
       via  57711cc2167f4fc4dc5a03f1b7e3b43e5c7e8050 (commit)
      from  2c1badeff23fe6c6bd1e5f8911b0afdfb005497c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 57711cc2167f4fc4dc5a03f1b7e3b43e5c7e8050
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Wed Oct 8 17:44:04 2014 -0700

    First cut at removing ppc-darwin-dlshim.c. Not needed anymore because
    dlsym works on OSX/ppc like on other ports.
    
    A cross-compile was used with cross-ppc-ppc-darwin.lisp.  I'm not sure
    a cross-compile is required, though.
    
     * code/ppc-vm.lisp:
       * EXTERN-ALIEN-NAME doesn't need to prepend an underscore anymore.
     * lisp/Config.ppc_darwin:
       * Don't compile/link ppc-darwin-dlshim.c.
     * lisp/os-common.c:
       * Don't prepend underscore for call_into_lisp.
     * tools/cross-scripts/cross-ppc-ppc-darwin.lisp:
       * EXTERN-ALIEN-NAME doesn't need to prepend an underscore anymore.

diff --git a/src/code/ppc-vm.lisp b/src/code/ppc-vm.lisp
index 6133533..fa977fd 100644
--- a/src/code/ppc-vm.lisp
+++ b/src/code/ppc-vm.lisp
@@ -297,10 +297,7 @@
 ;;; 
 (defun extern-alien-name (name)
   (declare (type simple-base-string name))
-  #+darwin
-  (concatenate 'string "_" name)
-  #-darwin
-  (concatenate 'string "" name))
+  name)
 
 #-linkage-table
 (defun lisp::foreign-symbol-address-aux (name flavor)
diff --git a/src/lisp/Config.ppc_darwin b/src/lisp/Config.ppc_darwin
index 4f06648..871a261 100644
--- a/src/lisp/Config.ppc_darwin
+++ b/src/lisp/Config.ppc_darwin
@@ -40,7 +40,8 @@ ASFLAGS = $(OSX_VERSION) -traditional -g -O3 -DDARWIN -Dppc $(LINKAGE) $(GENCGC)
 UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
 ASSEM_SRC = ppc-assem.S linux-stubs.S
 ARCH_SRC = ppc-arch.c
-OS_SRC = ppc-darwin-dlshim.c os-common.c Darwin-os.c
+#OS_SRC = ppc-darwin-dlshim.c os-common.c Darwin-os.c
+OS_SRC = os-common.c Darwin-os.c
 
 
 ifdef FEATURE_EXECUTABLE
diff --git a/src/lisp/Darwin-os.c b/src/lisp/Darwin-os.c
index 1f67b68..0efb72f 100644
--- a/src/lisp/Darwin-os.c
+++ b/src/lisp/Darwin-os.c
@@ -543,12 +543,21 @@ os_dlsym(const char *sym_name, lispobj lib_list)
 	    struct cons *lib_cons = CONS(CONS(lib_list_head)->car);
 	    struct sap *dlhandle = (struct sap *) PTR(lib_cons->car);
 
+#if 0 && defined(__ppc__)
+            sym_addr = dlsym((void *) dlhandle->pointer, (sym_name[0] == '_' ? sym_name + 1 : sym_name));
+#else
 	    sym_addr = dlsym((void *) dlhandle->pointer, sym_name);
+#endif
 	    if (sym_addr)
 		return sym_addr;
 	}
     }
+
+#if 0 && defined(__ppc__)
+    sym_addr = dlsym(program_handle, (sym_name[0] == '_' ? sym_name + 1 : sym_name));
+#else
     sym_addr = dlsym(program_handle, sym_name);
+#endif
 
     return sym_addr;
 }
diff --git a/src/lisp/os-common.c b/src/lisp/os-common.c
index 90458c9..b183d06 100755
--- a/src/lisp/os-common.c
+++ b/src/lisp/os-common.c
@@ -219,7 +219,7 @@ os_foreign_linkage_init(void)
 	    }
 	    arch_make_linkage_entry(i, (void*) call_into_c, 1);
 #elif (defined(DARWIN) && defined(__ppc__))
-	    if (type != 1 || strcmp(c_symbol_name, "_call_into_c")) {
+	    if (type != 1 || strcmp(c_symbol_name, "call_into_c")) {
 		fprintf(stderr, "linkage_data is %s but expected call_into_c\n",
 			(char *) c_symbol_name);
 		lose("First element of linkage_data is bogus.\n");
@@ -241,7 +241,7 @@ os_foreign_linkage_init(void)
 	    void *target_addr = os_dlsym(c_symbol_name, NIL);
 
 	    if (!target_addr) {
-#if 0
+#if 1
                 int k;
                 unsigned short int* wide_string;
                 
diff --git a/src/tools/cross-scripts/cross-ppc-ppc-darwin.lisp b/src/tools/cross-scripts/cross-ppc-ppc-darwin.lisp
index 3be7ae6..02e05ef 100644
--- a/src/tools/cross-scripts/cross-ppc-ppc-darwin.lisp
+++ b/src/tools/cross-scripts/cross-ppc-ppc-darwin.lisp
@@ -31,7 +31,7 @@
 (in-package :vm)
 (defun extern-alien-name (name)
   (declare (type simple-string name))
-  (concatenate 'string "_" name))
+  name)
 ;; When compiling the compiler, vm:fixup-code-object and
 ;; vm:sanctify-for-execution are undefined.  Import these to get rid
 ;; of that error.
@@ -199,7 +199,7 @@
 (in-package :vm)
 (defun extern-alien-name (name)
   (declare (type simple-string name))
-  (concatenate 'string "_" name))
+  name)
 (export 'extern-alien-name)
 (export 'fixup-code-object)
 (export 'sanctify-for-execution)

-----------------------------------------------------------------------

Summary of changes:
 src/code/ppc-vm.lisp                              |    5 +----
 src/lisp/Config.ppc_darwin                        |    3 ++-
 src/lisp/Darwin-os.c                              |    9 +++++++++
 src/lisp/os-common.c                              |    4 ++--
 src/tools/cross-scripts/cross-ppc-ppc-darwin.lisp |    4 ++--
 5 files changed, 16 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
CMU Common Lisp


More information about the cmucl-commit mailing list