0.9.9.36:
[sbcl.git] / src / runtime / Config.ppc-darwin
1 # -*- makefile -*- for the C-level run-time support for SBCL
2
3 # This software is part of the SBCL system. See the README file for
4 # more information.
5 #
6 # This software is derived from the CMU CL system, which was
7 # written at Carnegie Mellon University and released into the
8 # public domain. The software is in the public domain and is
9 # provided with absolutely no warranty. See the COPYING and CREDITS
10 # files for more information.
11
12 CFLAGS = -g -Wall -O2 -fdollars-in-identifiers
13 OS_SRC = bsd-os.c ppc-darwin-os.c ppc-darwin-dlshim.c ppc-darwin-langinfo.c
14 OS_LIBS = -lSystem -lc
15 OS_OBJS = ppc-darwin-rospace.o
16
17 CC = gcc
18
19 ASSEM_SRC = ppc-assem.S ldso-stubs.S
20 ARCH_SRC = ppc-arch.c
21
22 CPPFLAGS += -no-cpp-precomp
23
24 # KLUDGE: in OS X 10.3, Apple started putting the heap right where we
25 # expect our read-only space mapped. This hack causes the linker to
26 # place a zero-fill-on-demand segment in the same place and size as
27 # read-only-space, which is the only thing capable of keeping malloc
28 # out of this range.
29 LINKFLAGS += -dynamic `cat ppc-darwin-link-flags` -twolevel_namespace -bind_at_load
30
31 GC_SRC = $(shell if grep LISP_FEATURE_GENCGC genesis/config.h \
32                       > /dev/null 2>&1; \
33                    then echo "gencgc.c"; \
34                    else echo "cheneygc.c" ; fi)
35
36 OS_CLEAN_FILES += ppc-darwin-mkrospace ppc-darwin-fix-rospace ppc-darwin-link-flags
37
38 ppc-darwin-mkrospace: ppc-darwin-mkrospace.c
39         $(CC) -g -Wall -pedantic -o $@ $<
40
41 ppc-darwin-fix-rospace: ppc-darwin-fix-rospace.c
42         $(CC) -g -Wall -pedantic -o $@ $<
43
44 ppc-darwin-rospace.o ppc-darwin-link-flags: ppc-darwin-mkrospace
45         ./ppc-darwin-mkrospace > ppc-darwin-link-flags
46
47 .PHONY: after-grovel-headers
48
49 # Fix the sbcl runtime to avoid Panther placing the heap where
50 # it wants read only space (in the first 32 megabytes, where it
51 # can be absolute-branched to with BA.)  Must be done after 
52 # grovel-headers, because Apple's nm is broken.
53 after-grovel-headers: ppc-darwin-fix-rospace
54         ./ppc-darwin-fix-rospace
55
56 # Fortunatly make-target-1.sh does a make clean all the time.
57 # Otherwise we would have to make sure that sbcl gets rebuilt without
58 # the readonlyspace hack before groveling headers again.