Skip to content

Commit

Permalink
1.0.31.2: snow leopard (macos 10.6) build fixes
Browse files Browse the repository at this point in the history
 * on x86/darwin use -arch i386 flags in sb-grovel C compilation

 * comment out failing sb-posix tests

 * add -arch i386 flags to Config.x86-darwin CFLAGS and LINKFLAGS

 * remove #include <ucontext.h> instances
  • Loading branch information
Cyrus Harmon committed Aug 31, 2009
1 parent d2d37c8 commit 9e0cc7f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
2 changes: 2 additions & 0 deletions contrib/sb-grovel/def-to-lisp.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ code:
"-D_FILE_OFFSET_BITS=64")
#+(and x86-64 darwin)
'("-arch" "x86_64")
#+(and x86 darwin)
'("-arch" "i386")
#+(and x86-64 sunos) '("-m64")
(list "-o"
(namestring tmp-a-dot-out)
Expand Down
14 changes: 9 additions & 5 deletions contrib/sb-posix/posix-tests.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,15 @@
result)))
#.sb-posix::eacces)

#-darwin
(deftest stat.1
(let* ((stat (sb-posix:stat *test-directory*))
(mode (sb-posix::stat-mode stat)))
;; FIXME: Ugly ::s everywhere
(logand mode (logior sb-posix::s-iread sb-posix::s-iwrite sb-posix::s-iexec)))
#.(logior sb-posix::s-iread sb-posix::s-iwrite sb-posix::s-iexec))

#-win32
#-(or darwin win32)
(deftest stat.2
(let* ((stat (sb-posix:stat "/"))
(mode (sb-posix::stat-mode stat)))
Expand All @@ -241,7 +242,7 @@
(< (- atime unix-now) 10))
t)

#-win32
#-(or darwin win32)
(deftest stat.4
(let* ((stat (sb-posix:stat (make-pathname :directory '(:absolute :up))))
(mode (sb-posix::stat-mode stat)))
Expand Down Expand Up @@ -330,6 +331,7 @@
(sb-posix:s-isreg mode))
nil)

#-darwin
(deftest stat-mode.2
(with-stat-mode (mode *test-directory*)
(sb-posix:s-isdir mode))
Expand All @@ -356,7 +358,7 @@
(sb-posix:s-issock mode))
nil)

#-win32
#-(or win32 darwin)
(deftest stat-mode.7
(let ((link-pathname (make-pathname :name "stat-mode.7"
:defaults *test-directory*)))
Expand All @@ -368,6 +370,7 @@
(ignore-errors (sb-posix:unlink link-pathname))))
t)

#-darwin
(deftest stat-mode.8
(let ((pathname (make-pathname :name "stat-mode.8"
:defaults *test-directory*)))
Expand Down Expand Up @@ -515,6 +518,7 @@
(sb-posix:closedir dir)))
t)

#-darwin
(deftest readdir/dirent-name
(let ((dir (sb-posix:opendir *current-directory*)))
(unwind-protect
Expand Down Expand Up @@ -607,12 +611,12 @@
t)


#-win32
#-(or darwin win32)
(deftest time.1
(plusp (sb-posix:time))
t)

#-win32
#-(or darwin win32)
(deftest utimes.1
(let ((file (merge-pathnames #p"utimes.1" *test-directory*))
(atime (random (1- (expt 2 31))))
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/Config.x86-darwin
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# 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
LINKFLAGS += -mmacosx-version-min=10.4
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
OS_LIBS = -lSystem -lc -ldl
ifdef LISP_FEATURE_SB_THREAD
Expand Down
1 change: 0 additions & 1 deletion src/runtime/darwin-os.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "globals.h"
#include "runtime.h"
#include <signal.h>
#include <ucontext.h>
#include <limits.h>
#include <mach-o/dyld.h>
#include "bsd-os.h"
Expand Down
1 change: 0 additions & 1 deletion src/runtime/darwin-os.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ typedef struct ucontext os_context_t;


#else
#include <ucontext.h>
typedef ucontext_t os_context_t;
#endif

Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
;;; 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.31.1"
"1.0.31.2"

0 comments on commit 9e0cc7f

Please sign in to comment.