From eee8bd7b8ff15b1a1e443fad4987eec28ca386b7 Mon Sep 17 00:00:00 2001
From: Joachim Breitner <mail@joachim-breitner.de>
Date: Sun, 1 Jan 2012 02:15:02 +0100
Subject: [PATCH] Note bitness of S390/S390x

Closes: #5735
---
 aclocal.m4                 |    8 +++++++-
 compiler/utils/Platform.hs |    4 ++++
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 1d5d1f7..5deb1d2 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -183,7 +183,13 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
         mipsel)
             test -z "[$]2" || eval "[$]2=ArchMipsel"
             ;;
-        hppa|hppa1_1|ia64|m68k|rs6000|s390|s390x|sparc64|vax)
+        s390)
+            test -z "[$]2" || eval "[$]2=ArchS390"
+            ;;
+        s390x)
+            test -z "[$]2" || eval "[$]2=ArchS390x"
+            ;;
+        hppa|hppa1_1|ia64|m68k|rs6000|sparc64|vax)
             test -z "[$]2" || eval "[$]2=ArchUnknown"
             ;;
         *)
diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs
index 7253af1..46cbbef 100644
--- a/compiler/utils/Platform.hs
+++ b/compiler/utils/Platform.hs
@@ -43,6 +43,8 @@ data Arch
         | ArchARM
           { armISA    :: ArmISA
           , armISAExt :: [ArmISAExt] }
+        | ArchS390
+        | ArchS390x
         deriving (Read, Show, Eq)
 
 
@@ -85,6 +87,8 @@ target32Bit p = case platformArch p of
                 ArchPPC_64  -> False
                 ArchSPARC   -> True
                 ArchARM _ _ -> True
+                ArchS390    -> True
+                ArchS390x   -> False
 
 
 -- | This predicates tells us whether the OS supports ELF-like shared libraries.
-- 
1.7.7.3

