make SBCL_ARCH=x86 build work on 64-bit linux without chroot
authorNikodemus Siivola <nikodemus@sb-studio.net>
Mon, 1 Aug 2011 12:02:54 +0000 (15:02 +0300)
committerNikodemus Siivola <nikodemus@sb-studio.net>
Mon, 1 Aug 2011 14:57:51 +0000 (17:57 +0300)
 (Assuming all the compatibility libs, etc, have been installed.)

NEWS
contrib/sb-grovel/def-to-lisp.lisp
src/runtime/Config.x86-linux
tests/run-compiler.sh

diff --git a/NEWS b/NEWS
index c9a087d..79d55ee 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 ;;;; -*- coding: utf-8; fill-column: 78 -*-
 changes relative to sbcl-1.0.50:
+  * enhancement: building 32-bit SBCL on Linux/x86-64 now works without a
+    chroot. (Use "SBCL_ARCH=x86 sh make.sh" to build.)
   * bug fix: correct RIP offset calculation in SSE comparison and shuffle
     instructions. (lp#814688)
   * bug fix: COERCE to unfinalized extended sequence classes now works.
index 56039a2..7aca291 100644 (file)
@@ -205,6 +205,7 @@ code:
                       '("-D_LARGEFILE_SOURCE"
                         "-D_LARGEFILE64_SOURCE"
                         "-D_FILE_OFFSET_BITS=64")
+                      #+(and x86 linux) '("-m32")
                       #+(and x86-64 darwin inode64)
                       '("-arch" "x86_64"
                         "-mmacosx-version-min=10.5"
index d64a779..4b5f99e 100644 (file)
@@ -27,12 +27,13 @@ OS_SRC = linux-os.c x86-linux-os.c
 # (You *are* encouraged to design and implement a coherent stable
 # interface, though.:-| As far as I (WHN 2002-05-19) know, no one is
 # working on one and it would be a nice thing to have.)
-LINKFLAGS += -Wl,--export-dynamic
+LINKFLAGS += -Wl,--export-dynamic -m32
 OS_LIBS = -ldl
 
 ifdef LISP_FEATURE_LARGEFILE
   CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 endif
+CFLAGS += -m32
 
 ifdef LISP_FEATURE_SB_THREAD
   OS_LIBS += -lpthread
index d98aab0..0dd33fd 100644 (file)
@@ -10,11 +10,9 @@ fi
 args=
 case "$platform" in
     Darwin-X86-64) args="-arch x86_64" ;;
+    Darwin-X86)    args="-arch i386" ;;
     SunOS-X86-64)  args=-m64 ;;
-esac
-
-case "$platform" in
-    Darwin-X86) args="-arch i386" ;;
+    Linux-X86)     args="-m32" ;;
 esac
 
 while [ $# -gt 0 ]; do