From c97860a60a0caf0b713f1f30bd00e91d9b91b446 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 25 Nov 2007 05:24:43 +0000 Subject: [PATCH] Refine the gcc build flags for Mac OS X. Target version 10.4 if SDK available. --- v7/src/microcode/configure.ac | 22 +++++++++++++++++++--- v7/src/microcode/makegen/Makefile.in.in | 16 ++++++++-------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/v7/src/microcode/configure.ac b/v7/src/microcode/configure.ac index abe028294..97c392085 100644 --- a/v7/src/microcode/configure.ac +++ b/v7/src/microcode/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([MIT/GNU Scheme microcode], [15.1], [bug-mit-scheme@gnu.org], [mit-scheme]) -AC_REVISION([$Id: configure.ac,v 1.56 2007/09/04 03:35:19 riastradh Exp $]) +AC_REVISION([$Id: configure.ac,v 1.57 2007/11/25 05:24:42 cph Exp $]) AC_CONFIG_SRCDIR([boot.c]) AC_CONFIG_HEADERS([config.h]) AC_PROG_MAKE_SET @@ -272,8 +272,16 @@ dragonfly*) GNU_LD=yes ;; darwin*) - SCHEME_LDFLAGS="${SCHEME_LDFLAGS} -Wl,-pagezero_size,04000000" - MODULE_LDFLAGS="${MODULE_LDFLAGS} -bundle -flat_namespace -undefined suppress" + MACOSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk + if test -d ${MACOSX_SYSROOT}; then + MACOSX_CFLAGS="-mmacosx-version-min=10.4 -isysroot ${MACOSX_SYSROOT}" + MACOSX_LDFLAGS="${MACOSX_CFLAGS} -Wl,-syslibroot,${MACOSX_SYSROOT}" + CFLAGS="${CFLAGS} ${MACOSX_CFLAGS}" + SCHEME_LDFLAGS="${SCHEME_LDFLAGS} ${MACOSX_LDFLAGS}" + MODULE_CFLAGS="${MODULE_CFLAGS} ${MACOSX_CFLAGS}" + MODULE_LDFLAGS="${MODULE_LDFLAGS} ${MACOSX_LDFLAGS}" + fi + MODULE_LDFLAGS="${MODULE_LDFLAGS} -bundle -bundle_loader scheme" ;; netbsd*) DO_GCC_TESTS=yes @@ -999,6 +1007,14 @@ if test "x${MODULE_BASES}" != x; then done fi +if test ${SCM_ARCH} = i386; then + case ${host_os} in + darwin*) + SCHEME_LDFLAGS="${SCHEME_LDFLAGS} -Wl,-pagezero_size,04000000" + ;; + esac +fi + AC_SUBST([AS_FLAGS]) AC_SUBST([GC_HEAD_FILES]) AC_SUBST([M4_FLAGS]) diff --git a/v7/src/microcode/makegen/Makefile.in.in b/v7/src/microcode/makegen/Makefile.in.in index 73221e6d4..ed361733b 100644 --- a/v7/src/microcode/makegen/Makefile.in.in +++ b/v7/src/microcode/makegen/Makefile.in.in @@ -1,6 +1,6 @@ # -*- Makefile -*- # -# $Id: Makefile.in.in,v 1.60 2007/06/23 05:47:44 cph Exp $ +# $Id: Makefile.in.in,v 1.61 2007/11/25 05:24:43 cph Exp $ # # Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -196,25 +196,25 @@ extract-liarc-decls: extract-liarc-decls.o utabmd.bin: utabmd.scm ./utabmd.sh -prbfish.so: prbfish.o +prbfish.so: prbfish.o scheme $(LINK_MODULE) prbfish.o $(PRBFISH_LIBS) $(MODULE_LIBS) -prmd5.so: prmd5.o +prmd5.so: prmd5.o scheme $(LINK_MODULE) prmd5.o $(PRMD5_LIBS) $(MODULE_LIBS) -prmhash.so: prmhash.o +prmhash.so: prmhash.o scheme $(LINK_MODULE) prmhash.o -lmhash $(MODULE_LIBS) -prmcrypt.so: prmcrypt.o +prmcrypt.so: prmcrypt.o scheme $(LINK_MODULE) prmcrypt.o -lmcrypt -lltdl $(MODULE_LIBS) -prgdbm.so: prgdbm.o +prgdbm.so: prgdbm.o scheme $(LINK_MODULE) prgdbm.o -lgdbm $(MODULE_LIBS) -prdb4.so: prdb4.o +prdb4.so: prdb4.o scheme $(LINK_MODULE) prdb4.o -ldb-4 $(MODULE_LIBS) -prpgsql.so: prpgsql.o +prpgsql.so: prpgsql.o scheme $(LINK_MODULE) prpgsql.o -lpq $(MODULE_LIBS) @MODULE_RULES@ -- 2.25.1