Commit 0b2b8885 authored by rtoy's avatar rtoy
Browse files

Changes to support building on Mac OS X 10.6. When compiled on 10.6,

the resulting binary still works on 10.5.

lisp/Config.x86_darwin:
o Add -m32 flag to build and link a 32-bit binary.

lisp/Darwin-os.h:
o Include <sys/ucontext.h> instead of <ucontext.h> to get rid of the
  error about deprecated functions in ucontext.h.

lisp/gencgc.h:
o Mac OS X defines PAGE_SIZE in a header and that conflicts with our
  name.  Rename our PAGE_SIZE to GC_PAGE_SIZE.

lisp/gencgc.c:
o Rename PAGE_SIZE to GC_PAGE_SIZE.
parent ea712f42
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ include Config.x86_common
# Compile code that will run on OSX 10.4 (Tiger)
MIN_VER = -mmacosx-version-min=10.4

CPPFLAGS += -DDARWIN $(MIN_VER)
CPPFLAGS += -DDARWIN $(MIN_VER) -m32
CFLAGS += -g3
ASFLAGS += -g3 $(MIN_VER)

@@ -13,7 +13,7 @@ ASFLAGS += -g3 $(MIN_VER)
UNDEFSYMPATTERN = -Xlinker -u -Xlinker &

OS_SRC += Darwin-os.c mach-o.c
OS_LINK_FLAGS = $(MIN_VER)
OS_LINK_FLAGS = -m32 $(MIN_VER)
OS_LIBS =

EXEC_FINAL_OBJ = exec-final.o
+2 −2
Original line number Diff line number Diff line
/*

 $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Darwin-os.h,v 1.7 2008/01/03 11:41:54 cshapiro Rel $
 $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Darwin-os.h,v 1.8 2011/01/09 00:12:36 rtoy Exp $

 This code was written as part of the CMU Common Lisp project at
 Carnegie Mellon University, and has been placed in the public domain.
@@ -14,7 +14,7 @@
#include <sys/mman.h>
#include <sys/signal.h>
#include <signal.h>
#include <ucontext.h>
#include <sys/ucontext.h>
#include <mach/vm_types.h>

typedef caddr_t os_vm_address_t;
+81 −81

File changed.

Preview size limit exceeded, changes collapsed.

+7 −7
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 *
 * Douglas Crosher, 1996, 1997.
 *
 * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/gencgc.h,v 1.16 2009/11/02 15:05:07 rtoy Rel $
 * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/gencgc.h,v 1.17 2011/01/09 00:12:36 rtoy Exp $
 *
 */

@@ -124,7 +124,7 @@ struct page {
 */

#if defined(i386)
#define PAGE_SIZE 4096
#define GC_PAGE_SIZE 4096
#elif defined(sparc)
/*
 * For sparc, the minimum page size (physical page size) is 8K.
@@ -134,17 +134,17 @@ struct page {
 * page size.  (I'm assuming the gain is because we do the kernel
 * allocation trap less often.)
 */
#define PAGE_SIZE (4*8192)
#define GC_PAGE_SIZE (4*8192)
#elif defined(DARWIN)
/*
 * The physical page size is 4K.  Like sparc, this appears to be
 * somewhat slow (but need to verify that), so let's make the page
 * size 32K so we hit the allocation trap less often.
 */
/*#define PAGE_SIZE 4096*/
/*#define PAGE_SIZE (2*4096)*/
#define PAGE_SIZE (4*4096)
/*#define PAGE_SIZE (8*4096)*/
/*#define GC_PAGE_SIZE 4096*/
/*#define GC_PAGE_SIZE (2*4096)*/
#define GC_PAGE_SIZE (4*4096)
/*#define GC_PAGE_SIZE (8*4096)*/
#endif

extern unsigned dynamic_space_pages;