~ chicken-core (chicken-5) 30bb83a717842fd8b63662bddae855904434f1ac


commit 30bb83a717842fd8b63662bddae855904434f1ac
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Tue Sep 1 20:31:13 2015 +0200
Commit:     Evan Hanson <evhan@foldling.org>
CommitDate: Tue Sep 8 16:03:23 2015 +1200

    Add support for the Linux X32 ABI.
    
    This is simply a check on ARCH to add a flag to the C compiler and
    the linker.
    
    Thanks to Sven Hartrumpf for pointing out CHICKEN now supports this
    since the argvector changes, and for testing.
    
    Signed-off-by: Evan Hanson <evhan@foldling.org>

diff --git a/Makefile.linux b/Makefile.linux
index 45ae3a28..4ec121c8 100644
--- a/Makefile.linux
+++ b/Makefile.linux
@@ -50,6 +50,13 @@ LIBRARIES = -lm -ldl
 NEEDS_RELINKING = yes
 USES_SONAME = yes
 
+# architectures
+
+ifeq ($(ARCH),x32)
+C_COMPILER_OPTIONS += -mx32
+LINKER_OPTIONS += -mx32
+endif
+
 # special files
 
 CHICKEN_CONFIG_H = chicken-config.h
diff --git a/NEWS b/NEWS
index f77eb857..4357b6dc 100644
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,11 @@
   - The core units have been converted to modules under the "chicken"
     namespace.
 
+4.10.2
+
+- Platform support
+  - CHICKEN now supports the Linux X32 ABI (thanks to Sven Hartrumpf).
+
 4.10.1
 
 - Core libraries
diff --git a/README b/README
index 98191ad7..c85c2ce2 100644
--- a/README
+++ b/README
@@ -410,6 +410,9 @@
 
         Linux:
 
+	  - If you want to build Linux binaries which use the "X32 ABI",
+	    you can pass ARCH=x32 on the Make command line.
+
 	  - Some old Linux distributions ship with a buggy version of
 	    the GNU C compiler (2.96). If the system is configured for
 	    kernel recompilation, then an alternative GCC version is
Trap