ppc64 bootstrapping by Jiri Skala

This commit is contained in:
Jens Petersen 2011-04-21 18:24:42 +09:00
parent 23ba9b32ed
commit f103ae83ed
2 changed files with 47 additions and 3 deletions

18
ghc-ppc64-pthread.patch Normal file
View File

@ -0,0 +1,18 @@
diff -up ghc-7.0.2/aclocal.m4.pthread ghc-7.0.2/aclocal.m4
--- ghc-7.0.2/aclocal.m4.pthread 2011-02-28 13:10:03.000000000 -0500
+++ ghc-7.0.2/aclocal.m4 2011-04-20 07:12:36.489772545 -0400
@@ -1385,7 +1385,7 @@ AC_MSG_NOTICE(Building in-tree ghc-pwd)
dnl except we don't want to have to know what make is called. Sigh.
rm -rf utils/ghc-pwd/dist-boot
mkdir utils/ghc-pwd/dist-boot
- if ! "$WithGhc" -v0 -no-user-package-conf -hidir utils/ghc-pwd/dist-boot -odir utils/ghc-pwd/dist-boot -stubdir utils/ghc-pwd/dist-boot --make utils/ghc-pwd/Main.hs -o utils/ghc-pwd/dist-boot/ghc-pwd
+ if ! "$WithGhc" -optl-pthread -v0 -no-user-package-conf -hidir utils/ghc-pwd/dist-boot -odir utils/ghc-pwd/dist-boot -stubdir utils/ghc-pwd/dist-boot --make utils/ghc-pwd/Main.hs -o utils/ghc-pwd/dist-boot/ghc-pwd
then
AC_MSG_ERROR([Building ghc-pwd failed])
fi
diff -up ghc-7.0.2/ghc/ghc.wrapper.pthread ghc-7.0.2/ghc/ghc.wrapper
--- ghc-7.0.2/ghc/ghc.wrapper.pthread 2011-04-20 09:58:50.307894773 -0400
+++ ghc-7.0.2/ghc/ghc.wrapper 2011-04-20 09:59:14.477894370 -0400
@@ -1 +1 @@
-exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" -pgma "$pgmgcc" -pgml "$pgmgcc" -pgmP "$pgmgcc -E -undef -traditional" ${1+"$@"}
+exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" -pgma "$pgmgcc" -pgml "$pgmgcc" -pgmP "$pgmgcc -E -undef -traditional" -optl-pthread ${1+"$@"}

View File

@ -47,10 +47,10 @@ Version: 7.0.2
# - 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: 17%{?dist}
Release: 18%{?dist}
Summary: Glasgow Haskell Compilation system
# fedora ghc has only been bootstrapped on the following archs:
ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9
ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9 ppc64
License: BSD
Group: Development/Languages
Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
@ -82,6 +82,9 @@ BuildRequires: hscolour
%if %{with testsuite}
BuildRequires: python
%endif
%ifarch ppc64
BuildRequires: autoconf
%endif
Patch1: ghc-6.12.1-gen_contents_index-haddock-path.patch
Patch2: ghc-gen_contents_index-type-level.patch
Patch3: ghc-gen_contents_index-cron-batch.patch
@ -90,6 +93,7 @@ Patch4: ghc-use-system-libffi.patch
# (see http://hackage.haskell.org/trac/hackage/ticket/600)
Patch5: Cabal-option-executable-dynamic.patch
Patch6: ghc-fix-linking-on-sparc.patch
Patch7: ghc-ppc64-pthread.patch
%description
GHC is a state-of-the-art programming suite for Haskell, a purely
@ -172,6 +176,11 @@ rm -r ghc-tarballs/libffi
%patch6 -p1 -b .sparclinking
%ifarch ppc64
%patch7 -p1 -b .pthread
%endif
%build
cat > mk/build.mk << EOF
GhcLibWays = v %{?with_prof:p} %{!?ghc_without_shared:dyn}
@ -194,8 +203,20 @@ HSCOLOUR_SRCS = NO
%if %{with libffi}
SRC_HC_OPTS += -lffi
%endif
%ifarch ppc64
GhcUnregisterised=YES
GhcWithNativeCodeGen=NO
SplitObjs=NO
GhcWithInterpreter=NO
GhcNotThreaded=YES
SRC_HC_OPTS+=-optc-mminimal-toc -optl-pthread
SRC_CC_OPTS+=-mminimal-toc -pthread -Wa,--noexecstack
%endif
EOF
%ifarch ppc64
autoreconf
%endif
export CFLAGS="${CFLAGS:-%optflags}"
./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} \
--bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
@ -323,9 +344,11 @@ fi
%dir %{ghclibdir}
%{ghclibdir}/extra-gcc-opts
%{ghclibdir}/ghc
%{ghclibdir}/ghc-asm
%{ghclibdir}/ghc-pkg
%ifnarch ppc64
%{ghclibdir}/ghc-asm
%{ghclibdir}/ghc-split
%endif
%{ghclibdir}/ghc-usage.txt
%{ghclibdir}/ghci-usage.txt
%{ghclibdir}/hsc2hs
@ -374,6 +397,9 @@ fi
%endif
%changelog
* Thu Apr 21 2011 Jiri Skala <jskala@redhat.com> - 7.0.2-18
- bootstrap to ppc64
* Fri Apr 1 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-17
- rebuild against ghc-rpm-macros-0.11.14 to provide ghc-*-doc