From 893a908ea16e774edee20d505dcce0a2dd419098 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 26 Nov 2007 05:19:35 +0000 Subject: [PATCH] Fix problem introduced by previous change: argument to "-bundle_loader" must always point to the reference binary, but the reference must take several different forms for this to work. --- v7/src/microcode/configure.ac | 30 ++++++++++++++----------- v7/src/microcode/liarc-ld.in | 4 +++- v7/src/microcode/makegen/Makefile.in.in | 7 ++++-- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/v7/src/microcode/configure.ac b/v7/src/microcode/configure.ac index 97c392085..a596d63f9 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.57 2007/11/25 05:24:42 cph Exp $]) +AC_REVISION([$Id: configure.ac,v 1.58 2007/11/26 05:19:33 cph Exp $]) AC_CONFIG_SRCDIR([boot.c]) AC_CONFIG_HEADERS([config.h]) AC_PROG_MAKE_SET @@ -212,11 +212,20 @@ AC_C_PROTOTYPES AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET + +CFLAGS=${EXTRA_CFLAGS} +LDFLAGS=${EXTRA_LDFLAGS} + +if test x${MAC_ARCH} != x; then + CFLAGS="${CFLAGS} -arch ${MAC_ARCH}" + LDFLAGS="${LDFLAGS} -arch ${MAC_ARCH}" +fi + if test ${GCC} = yes; then if test ${enable_debugging} = no; then - CFLAGS="-O3" + CFLAGS="${CFLAGS} -O3" else - CFLAGS="-O0 -g -DENABLE_DEBUGGING_TOOLS" + CFLAGS="${CFLAGS} -O0 -g -DENABLE_DEBUGGING_TOOLS" LDFLAGS="${LDFLAGS} -g" fi CFLAGS="${CFLAGS} -Wall -Wundef -Wpointer-arith -Winline" @@ -272,16 +281,15 @@ dragonfly*) GNU_LD=yes ;; darwin*) + MACOSX=yes 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}" + LDFLAGS="${LDFLAGS} ${MACOSX_LDFLAGS}" fi - MODULE_LDFLAGS="${MODULE_LDFLAGS} -bundle -bundle_loader scheme" + MODULE_LDFLAGS="${MODULE_LDFLAGS} -bundle -bundle_loader "'${SCHEME_EXE}' ;; netbsd*) DO_GCC_TESTS=yes @@ -1007,12 +1015,8 @@ 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 +if test x${MACOSX} = xyes && test ${SCM_ARCH} = i386; then + SCHEME_LDFLAGS="${SCHEME_LDFLAGS} -Wl,-pagezero_size,04000000" fi AC_SUBST([AS_FLAGS]) diff --git a/v7/src/microcode/liarc-ld.in b/v7/src/microcode/liarc-ld.in index 1c45bfe0b..501163aa3 100644 --- a/v7/src/microcode/liarc-ld.in +++ b/v7/src/microcode/liarc-ld.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: liarc-ld.in,v 1.2 2007/05/14 16:50:54 cph Exp $ +# $Id: liarc-ld.in,v 1.3 2007/11/26 05:19:34 cph Exp $ # # Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -33,6 +33,8 @@ fi OUT=${1} shift +SCHEME_EXE=`dirname ${0}`/scheme + CMD="@CCLD@ @LDFLAGS@ @MODULE_LDFLAGS@ -o ${OUT} ${@}" echo "${CMD}" eval "${CMD}" diff --git a/v7/src/microcode/makegen/Makefile.in.in b/v7/src/microcode/makegen/Makefile.in.in index ed361733b..4ec16d08f 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.61 2007/11/25 05:24:43 cph Exp $ +# $Id: Makefile.in.in,v 1.62 2007/11/26 05:19:35 cph Exp $ # # Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -278,7 +278,10 @@ install-auxDATA: $(aux_DATA) install-include: $(mkinstalldirs) $(DESTDIR)$(AUXDIR) - $(INSTALL_PROGRAM) liarc-cc liarc-ld $(DESTDIR)$(AUXDIR)/. + $(INSTALL_PROGRAM) liarc-cc $(DESTDIR)$(AUXDIR)/. + sed -e "s&^SCHEME_EXE=.*&SCHEME_EXE=$(bindir)/$(EXE_NAME)&" < liarc-ld > liarc-ld.install + $(INSTALL_PROGRAM) liarc-ld.install $(DESTDIR)$(AUXDIR)/liarc-ld + rm -f liarc-ld.install $(mkinstalldirs) $(DESTDIR)$(AUXDIR)/include $(INSTALL_DATA) *.h $(DESTDIR)$(AUXDIR)/include/. -- 2.25.1