From: Nikodemus Siivola Date: Mon, 1 Aug 2011 12:02:54 +0000 (+0300) Subject: make SBCL_ARCH=x86 build work on 64-bit linux without chroot X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=af0f0f905a9a48360e34581563ce97acbe0a6e13;p=sbcl.git make SBCL_ARCH=x86 build work on 64-bit linux without chroot (Assuming all the compatibility libs, etc, have been installed.) --- diff --git a/NEWS b/NEWS index c9a087d..79d55ee 100644 --- 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. diff --git a/contrib/sb-grovel/def-to-lisp.lisp b/contrib/sb-grovel/def-to-lisp.lisp index 56039a2..7aca291 100644 --- a/contrib/sb-grovel/def-to-lisp.lisp +++ b/contrib/sb-grovel/def-to-lisp.lisp @@ -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" diff --git a/src/runtime/Config.x86-linux b/src/runtime/Config.x86-linux index d64a779..4b5f99e 100644 --- a/src/runtime/Config.x86-linux +++ b/src/runtime/Config.x86-linux @@ -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 diff --git a/tests/run-compiler.sh b/tests/run-compiler.sh index d98aab0..0dd33fd 100644 --- a/tests/run-compiler.sh +++ b/tests/run-compiler.sh @@ -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