[ghc/f17] add s390 and s390x to unregisterised_archs
Jens Petersen
petersen at fedoraproject.org
Thu Mar 8 03:17:00 UTC 2012
commit c6c2c4f65d86eef476c1e75515351dfdbbd4e8e7
Author: Jens Petersen <petersen at redhat.com>
Date: Mon Mar 5 18:21:07 2012 +0900
add s390 and s390x to unregisterised_archs
- add configure-s390x from debian
- only apply ppc64 pthread and mmap patches when bootstrapping
ghc-7.0.4-configure-s390x | 37 +++++++++++++++++++++++++++++++++++++
ghc.spec | 24 ++++++++++++++++++------
2 files changed, 55 insertions(+), 6 deletions(-)
---
diff --git a/ghc-7.0.4-configure-s390x b/ghc-7.0.4-configure-s390x
new file mode 100644
index 0000000..b79ed3a
--- /dev/null
+++ b/ghc-7.0.4-configure-s390x
@@ -0,0 +1,37 @@
+From 3a49e5147822bdfea2c763c863a7ca6b6baee609 Mon Sep 17 00:00:00 2001
+From: Joachim Breitner <mail at joachim-breitner.de>
+Date: Mon, 5 Sep 2011 09:37:24 +0200
+Subject: [PATCH] Add s390x to list of supported architectures
+
+---
+ aclocal.m4 | 3 +++
+ configure.ac | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+Index: ghc-7.0.4/aclocal.m4
+===================================================================
+--- ghc-7.0.4.orig/aclocal.m4 2011-08-31 08:44:42.000000000 +0200
++++ ghc-7.0.4/aclocal.m4 2011-09-05 14:08:59.000000000 +0200
+@@ -1457,6 +1457,9 @@
+ rs6000)
+ $2="rs6000"
+ ;;
++ s390x*)
++ $2="s390x"
++ ;;
+ s390*)
+ $2="s390"
+ ;;
+Index: ghc-7.0.4/configure.ac
+===================================================================
+--- ghc-7.0.4.orig/configure.ac 2011-06-13 19:10:04.000000000 +0200
++++ ghc-7.0.4/configure.ac 2011-09-05 14:08:59.000000000 +0200
+@@ -244,7 +244,7 @@
+
+ checkArch() {
+ case $1 in
+- alpha|arm|hppa|hppa1_1|i386|ia64|m68k|mips|mipseb|mipsel|powerpc|powerpc64|rs6000|s390|sparc|sparc64|vax|x86_64)
++ alpha|arm|hppa|hppa1_1|i386|ia64|m68k|mips|mipseb|mipsel|powerpc|powerpc64|rs6000|s390|s390x|sparc|sparc64|vax|x86_64)
+ ;;
+ *)
+ echo "Unknown arch $1"
diff --git a/ghc.spec b/ghc.spec
index 16dd0a2..4442b13 100644
--- a/ghc.spec
+++ b/ghc.spec
@@ -14,7 +14,7 @@
#%%global without_testsuite 1
# unregisterized archs
-%global unregisterised_archs ppc64 armv7hl armv5tel
+%global unregisterised_archs ppc64 armv7hl armv5tel s390 s390x
# ghc does not output dwarf format so debuginfo is not useful
%global debug_package %{nil}
@@ -30,11 +30,11 @@ Version: 7.0.4
# - release can only be reset if all library versions get bumped simultaneously
# (eg for a major release)
# - minor release numbers should be incremented monotonically
-Release: 43%{?dist}
+Release: 44%{?dist}
Summary: Glasgow Haskell Compiler
# fedora ghc has been bootstrapped on the following archs:
#ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9 ppc64 armv7hl armv5tel
-ExcludeArch: sparc64 s390x
+ExcludeArch: sparc64
License: %BSDHaskellReport
Group: Development/Languages
Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
@@ -66,7 +66,7 @@ BuildRequires: hscolour
%if %{undefined without_testsuite}
BuildRequires: python
%endif
-%ifarch ppc64
+%ifarch ppc64 s390x
BuildRequires: autoconf
%endif
Requires: ghc-compiler = %{version}-%{release}
@@ -83,6 +83,8 @@ Patch6: ghc-fix-linking-on-sparc.patch
Patch7: ghc-ppc64-pthread.patch
# http://hackage.haskell.org/trac/ghc/ticket/4999
Patch8: ghc-powerpc-linker-mmap.patch
+# touches configure.ac
+Patch9: ghc-7.0.4-configure-s390x
%description
GHC is a state-of-the-art, open source, compiler and interactive environment
@@ -198,14 +200,19 @@ ln -s $(pkg-config --variable=includedir libffi)/*.h libraries/base/include
%patch6 -p1 -b .sparclinking
-%ifarch ppc64
+%if %{defined ghc_bootstrapping}
+%ifarch ppc ppc64 s390 s390x
%patch7 -p1 -b .pthread
%endif
%ifarch ppc ppc64
%patch8 -p1 -b .mmap
%endif
+%endif
+%ifarch s390x
+%patch9 -p1 -b .s390x
+%endif
%build
# http://hackage.haskell.org/trac/ghc/wiki/Platforms
@@ -231,7 +238,7 @@ SRC_CC_OPTS+=-mminimal-toc -pthread -Wa,--noexecstack
%endif
EOF
-%ifarch ppc64
+%ifarch ppc64 s390x
autoreconf
%endif
export CFLAGS="${CFLAGS:-%optflags}"
@@ -418,6 +425,11 @@ fi
%files libraries
%changelog
+* Sat Mar 3 2012 Jens Petersen <petersen at redhat.com> - 7.0.4-44
+- add s390 and s390x to unregisterised_archs
+- add configure-s390x from debian
+- only apply ppc64 pthread and mmap patches when bootstrapping
+
* Thu Feb 9 2012 Jens Petersen <petersen at redhat.com> - 7.0.4-43
- fix build with system libffi on secondary archs by including libffi headers
in base/include
More information about the scm-commits
mailing list