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
4 OS_LIBS = -lSystem -lc -lm
6 # Avoid the gcc 3.3 prerelease tarpit of death!
9 ASSEM_SRC = ppc-assem.S ldso-stubs.S
12 CPP = cpp -no-cpp-precomp
14 # KLUDGE: in OS X 10.3, Apple started putting the heap right where we
15 # expect our read-only space mapped. This hack causes the linker to
16 # place a zero-fill-on-demand segment in the same place and size as
17 # read-only-space, which is the only thing capable of keeping malloc
20 # FIXME: "-Wl,-segaddr,SBCLRO,0x1000000" is output from
21 # ppc-darwin-mkrospace (it depends on READ_ONLY_SPACE I believe) but it
23 OS_LINK_FLAGS = -dynamic -Wl,-segaddr,SBCLRO,0x1000000 -Wl,-seg1addr,0x5000000 $(if $(AFTER_GROVEL_HEADERS),ppc-darwin-rospace.o)
27 CLEAN_FILES += ppc-darwin-mkrospace
29 ppc-darwin-mkrospace: ppc-darwin-mkrospace.c
32 ppc-darwin-rospace.o: ppc-darwin-mkrospace
33 ./ppc-darwin-mkrospace
35 .PHONY: after-grovel-headers
37 # Rebuild the sbcl runtime to avoid Panther placing the heap where
38 # it wants read only space (in the first 32 megabytes, where it
39 # can be absolute-branched to with BA.) Must be done after
40 # grovel-headers, because Apple's nm is broken.
41 after-grovel-headers: ppc-darwin-rospace.o
43 $(GNUMAKE) sbcl AFTER_GROVEL_HEADERS=1
45 # Fortunatly make-target-1.sh does a make clean all the time.
46 # Otherwise we would have to make sure that sbcl gets rebuilt without
47 # the readonlyspace hack before groveling headers again.