From a1946b35f37aef46677676e2696304ab6b405788 Mon Sep 17 00:00:00 2001
From: Raymond Toy <toy.raymond@gmail.com>
Date: Thu, 9 Oct 2014 23:44:38 -0700
Subject: [PATCH] Prepend underscore in extern-alien-name for darwin/ppc.

---
 src/code/ppc-vm.lisp                              | 2 +-
 src/tools/cross-scripts/cross-ppc-ppc-darwin.lisp | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/code/ppc-vm.lisp b/src/code/ppc-vm.lisp
index fa977fd58..522218cf4 100644
--- a/src/code/ppc-vm.lisp
+++ b/src/code/ppc-vm.lisp
@@ -297,7 +297,7 @@
 ;;; 
 (defun extern-alien-name (name)
   (declare (type simple-base-string name))
-  name)
+  (concatenate 'simple-base-string "_" name))
 
 #-linkage-table
 (defun lisp::foreign-symbol-address-aux (name flavor)
diff --git a/src/tools/cross-scripts/cross-ppc-ppc-darwin.lisp b/src/tools/cross-scripts/cross-ppc-ppc-darwin.lisp
index 02e05ef98..55261dc2e 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))
-  name)
+  (concatenate 'simple-string "_" 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))
-  name)
+  (concatenate 'simple-string "_" name))
 (export 'extern-alien-name)
 (export 'fixup-code-object)
 (export 'sanctify-for-execution)
-- 
GitLab