~ chicken-core (chicken-5) 7b310fa154c0f550852fd2586bfea3e50cdec1ea
commit 7b310fa154c0f550852fd2586bfea3e50cdec1ea Author: felix <felix@call-with-current-continuation.org> AuthorDate: Mon Mar 8 13:42:01 2010 +0100 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Mon Mar 8 13:42:01 2010 +0100 applied universal build mac os patch by Jim Ursetto diff --git a/Makefile.macosx b/Makefile.macosx index 15426b57..2c188da9 100644 --- a/Makefile.macosx +++ b/Makefile.macosx @@ -55,6 +55,7 @@ LINKER_LINK_SHARED_LIBRARY_OPTIONS = -dynamiclib -compatibility_version 1 -curre POSTINSTALL_PROGRAM_FLAGS = -change libchicken$(SO) $(LIBDIR)/libchicken$(SO) LIBRARIAN_OPTIONS = scru LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -bundle -L. +ASSEMBLER_OPTIONS = # file extensions @@ -64,6 +65,7 @@ SO = .dylib CHICKEN_CONFIG_H = chicken-config.h APPLY_HACK_OBJECT = apply-hack.$(ARCH)$(O) +HACKED_APPLY ?= 1 # architectures @@ -77,18 +79,8 @@ else ifeq ($(ARCH),universal) C_COMPILER_OPTIONS += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk LINKER_OPTIONS += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - -ifneq ($(HACKED_APPLY),) -# We undefine HACKED_APPLY in order to override rules.make. -HACKED_APPLY= -apply-hack.ppc.darwin$(O): apply-hack.ppc.darwin.S - as -arch ppc -o $@ $< -apply-hack.x86$(O): apply-hack.x86.S - as -arch i386 -o $@ $< -$(APPLY_HACK_OBJECT): apply-hack.x86$(O) apply-hack.ppc.darwin$(O) - lipo -create -output $(APPLY_HACK_OBJECT) $^ -endif endif + endif # select default and internal settings @@ -134,4 +126,20 @@ ifneq ($(HACKED_APPLY),) endif cat chicken-defaults.h >>$@ +ifeq ($(ARCH),universal) +ifneq ($(HACKED_APPLY),) +# We undefine HACKED_APPLY in order to override rules.make +# with our own build rules. +HACKED_APPLY= +apply-hack.ppc.darwin$(O): $(SRCDIR)apply-hack.ppc.darwin.S + $(ASSEMBLER) $(ASSEMBLER_OPTIONS) -arch ppc \ + $(ASSEMBLER_COMPILE_OPTION) $< $(ASSEMBLER_OUTPUT) +apply-hack.x86$(O): $(SRCDIR)apply-hack.x86.S + $(ASSEMBLER) $(ASSEMBLER_OPTIONS) -arch i386 \ + $(ASSEMBLER_COMPILE_OPTION) $< $(ASSEMBLER_OUTPUT) +$(APPLY_HACK_OBJECT): apply-hack.x86$(O) apply-hack.ppc.darwin$(O) + lipo -create -output $@ $^ +endif +endif + include $(SRCDIR)/rules.make diff --git a/README b/README index 5553d587..90c448a4 100644 --- a/README +++ b/README @@ -284,10 +284,11 @@ make PLATFORM=macosx ARCH=universal - On Leopard (10.5), an extra step is required before `make': + On Leopard (10.5), an extra step is required before `make', + and you must be sure to use GCC 4.0: export MACOSX_DEPLOYMENT_TARGET=10.4 - make PLATFORM=macosx ARCH=universal + make C_COMPILER=gcc-4.0 PLATFORM=macosx ARCH=universal - On Mac OS X, Chicken can be built in 64-bit mode on Intel Core 2 Duo systems--basically, most recent machines. The defaultTrap