Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ include Config.x86_common ...@@ -5,7 +5,7 @@ include Config.x86_common
# Compile code that will run on OSX 10.4 (Tiger) # Compile code that will run on OSX 10.4 (Tiger)
MIN_VER = -mmacosx-version-min=10.4 MIN_VER = -mmacosx-version-min=10.4
CPPFLAGS += -DDARWIN $(MIN_VER) CPPFLAGS += -DDARWIN $(MIN_VER) -m32
CFLAGS += -g3 CFLAGS += -g3
ASFLAGS += -g3 $(MIN_VER) ASFLAGS += -g3 $(MIN_VER)
...@@ -13,7 +13,7 @@ ASFLAGS += -g3 $(MIN_VER) ...@@ -13,7 +13,7 @@ ASFLAGS += -g3 $(MIN_VER)
UNDEFSYMPATTERN = -Xlinker -u -Xlinker & UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
OS_SRC += Darwin-os.c mach-o.c OS_SRC += Darwin-os.c mach-o.c
OS_LINK_FLAGS = $(MIN_VER) OS_LINK_FLAGS = -m32 $(MIN_VER)
OS_LIBS = OS_LIBS =
EXEC_FINAL_OBJ = exec-final.o EXEC_FINAL_OBJ = exec-final.o
......
/* /*
$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 This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain. Carnegie Mellon University, and has been placed in the public domain.
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/signal.h> #include <sys/signal.h>
#include <signal.h> #include <signal.h>
#include <ucontext.h> #include <sys/ucontext.h>
#include <mach/vm_types.h> #include <mach/vm_types.h>
typedef caddr_t os_vm_address_t; typedef caddr_t os_vm_address_t;
......
This diff is collapsed.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* Douglas Crosher, 1996, 1997. * 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 { ...@@ -124,7 +124,7 @@ struct page {
*/ */
#if defined(i386) #if defined(i386)
#define PAGE_SIZE 4096 #define GC_PAGE_SIZE 4096
#elif defined(sparc) #elif defined(sparc)
/* /*
* For sparc, the minimum page size (physical page size) is 8K. * For sparc, the minimum page size (physical page size) is 8K.
...@@ -134,17 +134,17 @@ struct page { ...@@ -134,17 +134,17 @@ struct page {
* page size. (I'm assuming the gain is because we do the kernel * page size. (I'm assuming the gain is because we do the kernel
* allocation trap less often.) * allocation trap less often.)
*/ */
#define PAGE_SIZE (4*8192) #define GC_PAGE_SIZE (4*8192)
#elif defined(DARWIN) #elif defined(DARWIN)
/* /*
* The physical page size is 4K. Like sparc, this appears to be * 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 * somewhat slow (but need to verify that), so let's make the page
* size 32K so we hit the allocation trap less often. * size 32K so we hit the allocation trap less often.
*/ */
/*#define PAGE_SIZE 4096*/ /*#define GC_PAGE_SIZE 4096*/
/*#define PAGE_SIZE (2*4096)*/ /*#define GC_PAGE_SIZE (2*4096)*/
#define PAGE_SIZE (4*4096) #define GC_PAGE_SIZE (4*4096)
/*#define PAGE_SIZE (8*4096)*/ /*#define GC_PAGE_SIZE (8*4096)*/
#endif #endif
extern unsigned dynamic_space_pages; extern unsigned dynamic_space_pages;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment