* bug fix: Name conflicts between symbols passed as arguments to a
single call to IMPORT no longer add multiple symbols with the same name
to the package (detectable via DO-SYMBOLS).
+ * bug fix: support building without the dlshim on darwin x86 and x86-64
+ (lp#533470).
changes in sbcl-1.0.39 relative to sbcl-1.0.38:
* bug fix: Backtrace from undefined function on x86 and x86-64 now show
# Under Darwin x86-64, guess whether Darwin 9+ or below.
if [ "$sbcl_os" = "darwin" ] && [ "$sbcl_arch" = "x86-64" ]; then
- darwin_version=`uname -r`
- darwin_version_major=${DARWIN_VERSION_MAJOR:-${darwin_version%%.*}}
- if (( 8 < $darwin_version_major )); then
- ver9_or_above="9+"
- printf ' :inode64' >> $ltf
- fi
+ darwin_version=`uname -r`
+ darwin_version_major=${DARWIN_VERSION_MAJOR:-${darwin_version%%.*}}
+ if (( 8 < $darwin_version_major )); then
+ printf ' :inode64 :darwin9-or-better' >> $ltf
+ fi
fi
original_dir=`pwd`
fi
link_or_copy $sbcl_arch-darwin-os.h target-arch-os.h
link_or_copy bsd-os.h target-os.h
- link_or_copy Config.$sbcl_arch-darwin$ver9_or_above Config
+ link_or_copy Config.$sbcl_arch-darwin Config
;;
sunos)
printf ' :unix' >> $ltf
(defun extern-alien-name (name)
(handler-case
- #!+elf (coerce name 'base-string)
- #!+(or mach-o win32) (concatenate 'base-string "_" name)
+ #!+(or elf (and mach-o (not dlshim))) (coerce name 'base-string)
+ #!+(or (and mach-o dlshim) win32) (concatenate 'base-string "_" name)
(error ()
(error "invalid external alien name: ~S" name))))
(values
(or (gethash extern table)
(gethash (concatenate 'base-string
- #!+(and darwin (or x86 x86-64 ppc)) "_ldso_stub__"
- #!-(and darwin (or x86 x86-64 ppc)) "ldso_stub__"
+ #!+(and mach-o dlshim) "_ldso_stub_"
+ #!+(and mach-o (not dlshim)) "ldso_stub__"
+ #!-mach-o "ldso_stub__"
extern) table)))))
(defun find-foreign-symbol-address (name)
(subseq line (1+ p2)))
(values (parse-integer line :end p1 :radix 16)
(subseq line (1+ p2))))
+ ; KLUDGE CLH 2010-05-31: on darwin, nm gives us
+ ;; _function but dlsym expects us to look up
+ ;; function, without the leading _ . Therefore, we
+ ;; strip it off here.
+ #!+(and darwin (not dlshim))
+ (when (equal (char name 0) #\_)
+ (setf name (subseq name 1)))
(multiple-value-bind (old-value found)
(gethash name *cold-foreign-symbol-table*)
(when (and found
# provided with absolutely no warranty. See the COPYING and CREDITS
# files for more information.
-CFLAGS = -g -Wall -O2 -fdollars-in-identifiers -mmacosx-version-min=10.4
+CFLAGS = -g -Wall -O2 -fdollars-in-identifiers
+ifdef LISP_FEATURE_DARWIN9_OR_BETTER
+CFLAGS += -mmacosx-version-min=10.5
+LINKFLAGS += -mmacosx-version-min=10.5
+else
+CFLAGS += -mmacosx-version-min=10.4
LINKFLAGS += -mmacosx-version-min=10.4
-OS_SRC = bsd-os.c x86-64-bsd-os.c darwin-os.c x86-64-darwin-os.c darwin-dlshim.c darwin-langinfo.c
+endif
+ifdef LISP_FEATURE_INODE64
+CFLAGS += -D_DARWIN_USE_64_BIT_INODE
+endif
+
+OS_SRC = bsd-os.c x86-64-bsd-os.c darwin-os.c x86-64-darwin-os.c darwin-langinfo.c
+ifdef LISP_FEATURE_DLSHIM
+ OS_SRC += darwin-dlshim.c
+endif
+
OS_LIBS = -lSystem -lc -ldl
ifdef LISP_FEATURE_SB_THREAD
OS_LIBS += -lpthread
+++ /dev/null
-# -*- makefile -*- for the C-level run-time support for SBCL
-
-# This software is part of the SBCL system. See the README file for
-# more information.
-#
-# This software is derived from the CMU CL system, which was
-# written at Carnegie Mellon University and released into the
-# public domain. The software is in the public domain and is
-# provided with absolutely no warranty. See the COPYING and CREDITS
-# files for more information.
-
-CFLAGS = -g -Wall -O2 -fdollars-in-identifiers -mmacosx-version-min=10.5 -D_DARWIN_USE_64_BIT_INODE
-LINKFLAGS += -mmacosx-version-min=10.5
-OS_SRC = bsd-os.c x86-64-bsd-os.c darwin-os.c x86-64-darwin-os.c darwin-dlshim.c darwin-langinfo.c
-OS_LIBS = -lSystem -lc -ldl
-ifdef LISP_FEATURE_SB_THREAD
- OS_LIBS += -lpthread
-endif
-
-ASSEM_SRC = x86-64-assem.S ldso-stubs.S
-ARCH_SRC = x86-64-arch.c
-
-LINKFLAGS += -arch x86_64 -dynamic -twolevel_namespace -bind_at_load -pagezero_size 0x100000
-
-CFLAGS += -arch x86_64 -fno-omit-frame-pointer -pagezero_size 0x100000
-
-GC_SRC = gencgc.c
-
-# Nothing to do for after-grovel-headers.
-.PHONY: after-grovel-headers
-after-grovel-headers:
# provided with absolutely no warranty. See the COPYING and CREDITS
# files for more information.
-CFLAGS = -arch i386 -g -Wall -O2 -fdollars-in-identifiers -mmacosx-version-min=10.4
-LINKFLAGS += -arch i386 -mmacosx-version-min=10.4
-OS_SRC = bsd-os.c x86-bsd-os.c darwin-os.c x86-darwin-os.c darwin-dlshim.c darwin-langinfo.c
+CFLAGS = -arch i386 -g -Wall -O2 -fdollars-in-identifiers
+LINKFLAGS += -arch i386
+ifdef LISP_FEATURE_DARWIN9_OR_BETTER
+CFLAGS += -mmacosx-version-min=10.5
+LINKFLAGS += -mmacosx-version-min=10.5
+else
+CFLAGS += -mmacosx-version-min=10.4
+LINKFLAGS += -mmacosx-version-min=10.4
+endif
+
+OS_SRC = bsd-os.c x86-bsd-os.c darwin-os.c x86-darwin-os.c darwin-langinfo.c
+ifdef LISP_FEATURE_DLSHIM
+ OS_SRC += darwin-dlshim.c
+endif
+
OS_LIBS = -lSystem -lc -ldl
ifdef LISP_FEATURE_SB_THREAD
OS_LIBS += -lpthread
#include "bsd-os.h"
#include <errno.h>
+#ifndef LISP_FEATURE_DLSHIM
+#include <dlfcn.h>
+#endif
+
char *
os_get_runtime_executable_path(int external)
{
* more information.
*/
+#include "genesis/config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
#include <sys/termios.h>
- #ifdef __APPLE_CC__
- #include "../src/runtime/darwin-dlshim.h"
+ #ifdef LISP_FEATURE_DARWIN
#include "../src/runtime/darwin-langinfo.h"
+ #endif
+ #ifdef LISP_FEATURE_DLSHIM
+ #include "../src/runtime/darwin-dlshim.h"
#else
#include <dlfcn.h>
- #include <langinfo.h>
#endif
#endif
#include <signal.h>
#include <errno.h>
-#include "genesis/config.h"
-
#ifdef LISP_FEATURE_HPUX
#include <sys/bsdtty.h> /* for TIOCGPGRP */
#endif
#define LDSO_STUBIFY(fct) \\
.text ; \\
.align 4 ; \\
-.globl _ldso_stub___ ## fct ; \\
-_ldso_stub___ ## fct: ; \\
+.globl _ldso_stub__ ## fct ; \\
+_ldso_stub__ ## fct: ; \\
jmp L ## fct ## $stub ; \\
.section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 ; \\
L ## fct ## $stub: ; \\
#!+(and darwin x86-64) "
#define LDSO_STUBIFY(fct) \\
.align 4 ; \\
-.globl _ldso_stub___ ## fct ; \\
-_ldso_stub___ ## fct: ; \\
+.globl _ldso_stub__ ## fct ; \\
+_ldso_stub__ ## fct: ; \\
jmp _ ## fct ; \\
.L ## fct ## e1: ; "
"unlockpt")
#!+openbsd
'("openpty")
- #!-darwin
+ #!-dlshim
'("dlclose"
"dlerror"
"dlopen"
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.39.2"
+"1.0.39.3"