From 879ee001c5cf2a1e8d7d2964ea61ef0200a8483d Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Fri, 12 Sep 2008 21:04:25 +0000
Subject: [PATCH] After building the C code, we need to run build-world again
 to create a core file with the right addresses for undefined_tramp and
 closure_tramp.

Only needed on Solaris and ppc.
---
 tools/build.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/tools/build.sh b/tools/build.sh
index bd46f3d56..5e6e9dc61 100755
--- a/tools/build.sh
+++ b/tools/build.sh
@@ -88,6 +88,15 @@ usage ()
     exit 1
 }
 
+# Figure out if we need to run build-world twice
+case `uname -s` in
+  SunOS) BUILD_WORLD2=yes ;;
+  Darwin)
+      case `uname -m` in
+	ppc) BUILD_WORLD2=yes ;;
+      esac ;;
+esac
+
 buildit ()
 {
     if echo $INTERACTIVE_BUILD | grep $BUILD > /dev/null; then
@@ -107,7 +116,10 @@ buildit ()
 	$TOOLDIR/clean-target.sh $TARGET
 	$TIMER $TOOLDIR/build-world.sh $TARGET $OLDLISP $BOOT
 	(cd $TARGET/lisp; $MAKE)
-	#$TOOLDIR/build-world.sh $TARGET $OLDLISP
+	if [ "$BUILD_WORLD2" = "yes" ];
+	then
+	    $TOOLDIR/build-world.sh $TARGET $OLDLISP
+	fi
 	$TOOLDIR/load-world.sh $TARGET "$VERSION"
 	if [ ! -f $TARGET/lisp/lisp.core ]; then
 	    echo "Failed to build $TARGET!"
-- 
GitLab