0.8.19.1: PowerPC linkage tables (darwin only for now)
[sbcl.git] / src / runtime / Config.ppc-darwin
1 # -*- makefile -*-
2 CFLAGS = -Dppc -g -Wall -O2 -no-cpp-precomp
3 OS_SRC = bsd-os.c os-common.c ppc-darwin-os.c ppc-darwin-dlshim.c ppc-darwin-langinfo.c
4 OS_LIBS = -lSystem -lc -lm
5
6 CC = gcc
7
8 ASSEM_SRC = ppc-assem.S ldso-stubs.S
9 ARCH_SRC = ppc-arch.c
10
11 CPP = cpp -no-cpp-precomp
12
13 # KLUDGE: in OS X 10.3, Apple started putting the heap right where we
14 # expect our read-only space mapped. This hack causes the linker to
15 # place a zero-fill-on-demand segment in the same place and size as
16 # read-only-space, which is the only thing capable of keeping malloc
17 # out of this range."
18 #
19 # FIXME: "-Wl,-segaddr,SBCLRO,0x1000000" is output from
20 # ppc-darwin-mkrospace (it depends on READ_ONLY_SPACE I believe) but it
21 # is hard-coded here!
22 OS_LINK_FLAGS = -dynamic -Wl,-segaddr,SBCLRO,0x1000000 -Wl,-seg1addr,0x5000000 $(if $(AFTER_GROVEL_HEADERS),ppc-darwin-rospace.o)
23
24 GC_SRC= cheneygc.c
25
26 CLEAN_FILES += ppc-darwin-mkrospace
27
28 ppc-darwin-mkrospace: ppc-darwin-mkrospace.c
29         $(CC) -o $@ $<
30
31 ppc-darwin-rospace.o: ppc-darwin-mkrospace
32         ./ppc-darwin-mkrospace
33
34 .PHONY: after-grovel-headers
35
36 # Rebuild the sbcl runtime to avoid Panther placing the heap where
37 # it wants read only space (in the first 32 megabytes, where it
38 # can be absolute-branched to with BA.)  Must be done after 
39 # grovel-headers, because Apple's nm is broken.
40 after-grovel-headers: ppc-darwin-rospace.o
41         rm -f sbcl
42         $(GNUMAKE) sbcl AFTER_GROVEL_HEADERS=1
43
44 # Fortunatly make-target-1.sh does a make clean all the time.
45 # Otherwise we would have to make sure that sbcl gets rebuilt without
46 # the readonlyspace hack before groveling headers again.