X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2FConfig.ppc-darwin;h=d911ab9d76735a100621163af339cecb3fba8e8e;hb=80f222325e1f677e5cf8de01c6990906fa47f65d;hp=a208c5d11f9758fbcff1cd037bd3a572b8b28fa6;hpb=b7cfa0e5e726c2037ba2c6cb32406ff7e9764dd2;p=sbcl.git diff --git a/src/runtime/Config.ppc-darwin b/src/runtime/Config.ppc-darwin index a208c5d..d911ab9 100644 --- a/src/runtime/Config.ppc-darwin +++ b/src/runtime/Config.ppc-darwin @@ -1,9 +1,9 @@ # -*- makefile -*- -CFLAGS = -DDARWIN -Dppc -g -Wall -O3 -no-cpp-precomp +CFLAGS = -Dppc -g -Wall -O2 -no-cpp-precomp OS_SRC = bsd-os.c os-common.c ppc-darwin-os.c ppc-darwin-dlshim.c OS_LIBS = -lSystem -lc -lm -# Avoid the dreaded gcc 3.3 prerelease tarpit of death! +# Avoid the gcc 3.3 prerelease tarpit of death! CC = gcc3 ASSEM_SRC = ppc-assem.S ldso-stubs.S @@ -11,7 +11,37 @@ ARCH_SRC = ppc-arch.c CPP = cpp -no-cpp-precomp -OS_LINK_FLAGS = -dynamic -L$(HOME)/local/lib -L/sw/lib -L/opt/local/lib -L/usr/local/lib +# KLUDGE: in OS X 10.3, Apple started putting the heap right where we +# expect our read-only space mapped. This hack causes the linker to +# place a zero-fill-on-demand segment in the same place and size as +# read-only-space, which is the only thing capable of keeping malloc +# out of this range." +# +# FIXME: "-Wl,-segaddr,SBCLRO,0x1000000" is output from +# ppc-darwin-mkrospace (it depends on READ_ONLY_SPACE I believe) but it +# is hard-coded here! +OS_LINK_FLAGS = -dynamic -Wl,-segaddr,SBCLRO,0x1000000 -Wl,-seg1addr,0x5000000 $(if $(AFTER_GROVEL_HEADERS),ppc-darwin-rospace.o) GC_SRC= cheneygc.c +CLEAN_FILES += ppc-darwin-mkrospace + +ppc-darwin-mkrospace: ppc-darwin-mkrospace.c + $(CC) -o $@ $< + +ppc-darwin-rospace.o: ppc-darwin-mkrospace + ./ppc-darwin-mkrospace + +.PHONY: after-grovel-headers + +# Rebuild the sbcl runtime to avoid Panther placing the heap where +# it wants read only space (in the first 32 megabytes, where it +# can be absolute-branched to with BA.) Must be done after +# grovel-headers, because Apple's nm is broken. +after-grovel-headers: ppc-darwin-rospace.o + rm -f sbcl + $(GNUMAKE) sbcl AFTER_GROVEL_HEADERS=1 + +# Fortunatly make-target-1.sh does a make clean all the time. +# Otherwise we would have to make sure that sbcl gets rebuilt without +# the readonlyspace hack before groveling headers again.