From adee73e6ef638345249a41b6f308f4a5f6452c25 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 3 Aug 2014 23:54:24 +0900 Subject: [PATCH] major update to 7.8.3: bootstrap build --- .gitignore | 2 + ghc-cabal-unversion-docdir.patch | 26 ++--- ghc.spec | 174 +++++++++++++++---------------- sources | 4 +- 4 files changed, 104 insertions(+), 102 deletions(-) diff --git a/.gitignore b/.gitignore index 8654e4f..1975bde 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ testsuite-6.12.3.tar.bz2 /ghc-7.6.3-src.tar.bz2 /ghc-7.6.3-testsuite.tar.bz2 /ghc-7.6.3/ +/ghc-7.8.3-src.tar.xz +/ghc-7.8.3-testsuite.tar.xz diff --git a/ghc-cabal-unversion-docdir.patch b/ghc-cabal-unversion-docdir.patch index 0aefeb5..9d0b026 100644 --- a/ghc-cabal-unversion-docdir.patch +++ b/ghc-cabal-unversion-docdir.patch @@ -1,13 +1,13 @@ ---- ghc-7.6.3/utils/ghc-cabal/Main.hs~ 2013-04-19 06:22:47.000000000 +0900 -+++ ghc-7.6.3/utils/ghc-cabal/Main.hs 2013-10-29 12:35:18.916340631 +0900 -@@ -180,8 +180,8 @@ - libsubdir = toPathTemplate "$pkgid", - docdir = toPathTemplate $ - if relocatableBuild -- then "$topdir/../doc/html/libraries/$pkgid" -- else (myDocdir "$pkgid"), -+ then "$topdir/../doc/html/libraries/$pkg" -+ else (myDocdir "$pkg"), - htmldir = toPathTemplate "$docdir" - } - progs = withPrograms lbi +--- ghc-7.8/utils/ghc-cabal/Main.hs~ 2013-08-28 08:06:37.000000000 +0900 ++++ ghc-7.8/utils/ghc-cabal/Main.hs 2013-09-03 17:51:22.800653817 +0900 +@@ -251,8 +251,8 @@ + libsubdir = toPathTemplate "$pkgid", + docdir = toPathTemplate $ + if relocatableBuild +- then "$topdir/../doc/html/libraries/$pkgid" +- else (myDocdir "$pkgid"), ++ then "$topdir/../doc/html/libraries/$pkg" ++ else (myDocdir "$pkg"), + htmldir = toPathTemplate "$docdir" + } + diff --git a/ghc.spec b/ghc.spec index 56d7995..23e000f 100644 --- a/ghc.spec +++ b/ghc.spec @@ -1,13 +1,12 @@ -# Shared haskell libraries are supported for x86* archs -# (disabled for other archs in ghc-rpm-macros) - # To bootstrap build a new version of ghc, uncomment the following: -#%%global ghc_bootstrapping 1 -#%%global without_testsuite 1 -### either: -#%%{?ghc_bootstrap} -### or for shared libs: -#%%{?ghc_test} +%global ghc_bootstrapping 1 +%global without_testsuite 1 +%global without_prof 1 +%if 0%{?fedora} >= 22 +%{?ghc_bootstrap} +%else +%{?ghc_test} +%endif ### uncomment to generate haddocks for bootstrap #%%undefine without_haddock @@ -17,45 +16,31 @@ Name: ghc # part of haskell-platform # ghc must be rebuilt after a version bump to avoid ABI change problems -Version: 7.6.3 +Version: 7.8.3 # Since library subpackages are versioned: # - release can only be reset if *all* library versions get bumped simultaneously # (sometimes after a major release) # - minor release numbers for a branch should be incremented monotonically -Release: 25%{?dist} +# xhtml moved from haskell-platform to ghc-7.8.3 +Release: 38%{?dist} Summary: Glasgow Haskell Compiler License: %BSDHaskellReport URL: http://haskell.org/ghc/ -Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2 +Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.xz %if %{undefined without_testsuite} -Source2: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-testsuite.tar.bz2 +Source2: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-testsuite.tar.xz %endif Source3: ghc-doc-index.cron Source4: ghc-doc-index # absolute haddock path (was for html/libraries -> libraries) Patch1: ghc-gen_contents_index-haddock-path.patch -# fedora does not allow copy libraries -Patch4: ghc-use-system-libffi.patch -# fix dynamic linking of executables using Template Haskell -Patch9: Cabal-fix-dynamic-exec-for-TH.patch # add libffi include dir to ghc wrapper for archs using gcc/llc -Patch10: ghc-wrapper-libffi-include.patch -# disable building HS*.o libs for ghci -Patch12: ghc-7.4.2-Cabal-disable-ghci-libs.patch -# fix compilation with llvm-3.3 -Patch13: ghc-llvmCodeGen-empty-array.patch +#Patch10: ghc-wrapper-libffi-include.patch # stop warnings about unsupported version of llvm Patch14: ghc-7.6.3-LlvmCodeGen-llvm-version-warning.patch -# fix hang on ppc64 and s390x (upstream in 7.8) -Patch15: ghc-64bit-bigendian-rts-hang-989593.patch # unversion library html docdirs Patch16: ghc-cabal-unversion-docdir.patch -# fix libffi segfaults on 32bit (upstream in 7.8) -Patch17: ghc-7.6.3-rts-Adjustor-32bit-segfault.patch -# add .note.GNU-stack to assembly output to avoid execstack (#973512) -# (disabled for now since it changes libghc ABI and fix only works for i686) -#Patch18: ghc-7.6-driver-Disable-executable-stack-for-the-linker-note.patch # changes for ppc64le committed upstream for 7.8.3 # (https://ghc.haskell.org/trac/ghc/ticket/8965) Patch19: ghc-ppc64el.patch @@ -65,29 +50,34 @@ Patch20: ghc-glibc-2.20_BSD_SOURCE.patch Patch21: ghc-arm64.patch Patch22: ghc-7.6.3-armv7-VFPv3D16--NEON.patch -%global Cabal_ver 1.16.0 -%global array_ver 0.4.0.1 -%global base_ver 4.6.0.1 +%global Cabal_ver 1.18.1.3 +%global array_ver 0.5.0.0 +%global base_ver 4.7.0.1 %global bin_package_db_ver 0.0.0.0 -%global binary_ver 0.5.1.1 -%global bytestring_ver 0.10.0.2 -%global containers_ver 0.5.0.0 -%global deepseq_ver 1.3.0.1 -%global directory_ver 1.2.0.1 -%global filepath_ver 1.3.0.1 -%global ghc_prim_ver 0.3.0.0 -%global haskell2010_ver 1.1.1.0 -%global haskell98_ver 2.0.0.2 -%global hoopl_ver 3.9.0.0 -%global hpc_ver 0.6.0.0 -%global integer_gmp_ver 0.5.0.0 -%global old_locale_ver 1.0.0.5 -%global old_time_ver 1.1.0.1 -%global pretty_ver 1.1.1.0 -%global process_ver 1.1.0.2 -%global template_haskell_ver 2.8.0.0 -%global time_ver 1.4.0.1 -%global unix_ver 2.6.0.1 +%global binary_ver 0.7.1.0 +%global bytestring_ver 0.10.4.0 +%global containers_ver 0.5.5.1 +%global deepseq_ver 1.3.0.2 +%global directory_ver 1.2.1.0 +%global filepath_ver 1.3.0.2 +%global ghc_prim_ver 0.3.1.0 +%global haskeline_ver 0.7.1.2 +%global haskell2010_ver 1.1.2.0 +%global haskell98_ver 2.0.0.3 +%global hoopl_ver 3.10.0.1 +%global hpc_ver 0.6.0.1 +%global integer_gmp_ver 0.5.1.0 +%global old_locale_ver 1.0.0.6 +%global old_time_ver 1.1.0.2 +%global pretty_ver 1.1.1.1 +%global process_ver 1.2.0.0 +%global template_haskell_ver 2.9.0.0 +%global terminfo_ver 0.4.0.0 +%global time_ver 1.4.2 +%global transformers_ver 0.3.0.0 +%global unix_ver 2.7.0.1 +%global xhtml_ver 3000.2.1 + # fedora ghc has been bootstrapped on # %{ix86} x86_64 ppc alpha sparcv9 ppc64 armv7hl armv5tel s390 s390x @@ -103,11 +93,12 @@ Obsoletes: ghc-feldspar-language < 0.4, ghc-feldspar-language-devel < 0.4, ghc-f %if %{undefined ghc_bootstrapping} BuildRequires: ghc-compiler = %{version} %endif -%if 0%{?fedora} >= 20 +%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7 BuildRequires: ghc-rpm-macros-extra %else BuildRequires: ghc-rpm-macros %endif +BuildRequires: ghc-binary-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-containers-devel BuildRequires: ghc-directory-devel @@ -116,9 +107,9 @@ BuildRequires: ghc-pretty-devel BuildRequires: ghc-process-devel BuildRequires: gmp-devel BuildRequires: libffi-devel -# for internal terminfo +# for terminfo BuildRequires: ncurses-devel -# for manpage and docs +# for man and docs BuildRequires: libxslt, docbook-style-xsl %if %{undefined without_testsuite} BuildRequires: python @@ -218,6 +209,7 @@ documention. # in ghc not ghc-libraries: %ghc_lib_subpackage -x ghc %{ghc_version_override} %undefine ghc_pkg_obsoletes +%ghc_lib_subpackage haskeline %{haskeline_ver} %ghc_lib_subpackage -l HaskellReport haskell2010 %{haskell2010_ver} %ghc_lib_subpackage -l HaskellReport haskell98 %{haskell98_ver} %ghc_lib_subpackage hoopl %{hoopl_ver} @@ -229,8 +221,11 @@ documention. %ghc_lib_subpackage -l %BSDHaskellReport process %{process_ver} %undefine ghc_pkg_obsoletes %ghc_lib_subpackage template-haskell %{template_haskell_ver} +%ghc_lib_subpackage -c ncurses-devel%{?_isa} terminfo %{terminfo_ver} %ghc_lib_subpackage time %{time_ver} +%ghc_lib_subpackage transformers %{transformers_ver} %ghc_lib_subpackage unix %{unix_ver} +%ghc_lib_subpackage xhtml %{xhtml_ver} %endif %global version %{ghc_version_override} @@ -258,24 +253,13 @@ except the ghc library, which is installed by the toplevel ghc metapackage. # gen_contents_index: use absolute path for haddock %patch1 -p1 -b .orig -# make sure we don't use these -rm -r ghc-tarballs/{mingw*,perl} -# use system libffi -%patch4 -p1 -b .libffi -rm -r ghc-tarballs/libffi -mkdir -p rts/dist/build -ln -s $(pkg-config --variable=includedir libffi)/*.h rts/dist/build - -%patch9 -p1 -b .orig +# unversion pkgdoc htmldir +rm -r libffi-tarballs %ifnarch %{ix86} x86_64 -%patch10 -p1 -b .10-ffi +#%%patch10 -p1 -b .10-ffi %endif -%patch12 -p1 -b .orig - -%patch13 -p1 -b .orig - %ifarch armv7hl armv5tel %patch14 -p1 -b .orig %endif @@ -288,10 +272,6 @@ ln -s $(pkg-config --variable=includedir libffi)/*.h rts/dist/build %patch16 -p1 -b .orig %endif -%patch17 -p0 -b .orig - -#%%patch18 -p1 -b .orig - %ifarch ppc64le %patch19 -p1 -b .orig %endif @@ -342,8 +322,8 @@ BUILD_DOCBOOK_HTML = NO EOF export CFLAGS="${CFLAGS:-%optflags}" -# note %%configure induces cross-build due to different target/host/build platform names -# --with-gcc=%{_bindir}/gcc is to avoid ccache hardcoding problem when bootstrapping +# * %%configure induces cross-build due to different target/host/build platform names +# * --with-gcc=%{_bindir}/gcc is to avoid ccache hardcoding problem when bootstrapping %ifarch ppc64le aarch64 armv7hl for i in $(find . -name config.guess -o -name config.sub) ; do [ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i @@ -355,10 +335,11 @@ autoreconf --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} \ --libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \ --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \ - --with-gcc=%{_bindir}/gcc + --with-gcc=%{_bindir}/gcc --with-system-libffi -# utf8 is needed when building with verbose output -LANG=en_US.utf8 make %{?_smp_mflags} +# avoid "ghc: hGetContents: invalid argument (invalid byte sequence)" +export LANG=en_US.utf8 +make %{?_smp_mflags} %install @@ -390,11 +371,15 @@ echo "%doc libraries/LICENSE.%1" >> ghc-%2.files %merge_filelist bin-package-db ghc # add rts libs +echo "%dir %{ghclibdir}/rts-1.0" >> ghc-base.files %if %{undefined ghc_without_shared} -ls %{buildroot}%{ghclibdir}/libHS*.so >> ghc-base.files -sed -i -e "s|^%{buildroot}||g" ghc-base.files +ls %{buildroot}%{ghclibdir}/rts-1.0/libHS*.so >> ghc-base.files %endif -ls -d %{buildroot}%{ghclibdir}/libHS*.a %{buildroot}%{ghclibdir}/package.conf.d/builtin_*.conf %{buildroot}%{ghclibdir}/include >> ghc-base-devel.files + +sed -i -e "s|^%{buildroot}||g" ghc-base.files + +ls -d %{buildroot}%{ghclibdir}/rts-1.0/lib*.a %{buildroot}%{ghclibdir}/package.conf.d/builtin_*.conf %{buildroot}%{ghclibdir}/include >> ghc-base-devel.files + sed -i -e "s|^%{buildroot}||g" ghc-base-devel.files # these are handled as alternatives @@ -421,8 +406,12 @@ sh %{gen_contents_index} --intree --verbose cd .. %endif +# we package the library license files separately +find %{buildroot}%ghclibdocdir -name LICENSE -exec rm '{}' ';' + %check +export LANG=en_US.utf8 # stolen from ghc6/debian/rules: GHC=inplace/bin/ghc-stage2 # Do some very simple tests that the compiler actually works @@ -477,7 +466,7 @@ fi %files %files compiler -%doc ANNOUNCE HACKING LICENSE README +%doc ANNOUNCE LICENSE %{_bindir}/ghc %{_bindir}/ghc-%{version} %{_bindir}/ghc-pkg @@ -491,18 +480,22 @@ fi %{_bindir}/runghc* %ghost %{_bindir}/runhaskell %{_bindir}/runhaskell-ghc -%{ghclibdir}/ghc -%{ghclibdir}/ghc-pkg -# unknown ("unregisterized") archs +%dir %{ghclibdir}/bin +%{ghclibdir}/bin/ghc +%{ghclibdir}/bin/ghc-pkg +%{ghclibdir}/bin/hpc +%{ghclibdir}/bin/hsc2hs +%{ghclibdir}/bin/runghc +# unknown (unregisterized) archs %ifnarch ppc64 s390 s390x ppc64le aarch64 %{ghclibdir}/ghc-split %endif %{ghclibdir}/ghc-usage.txt %{ghclibdir}/ghci-usage.txt -%{ghclibdir}/hsc2hs +%{ghclibdir}/mkGmpDerivedConstants %dir %{ghclibdir}/package.conf.d %ghost %{ghclibdir}/package.conf.d/package.cache -%{ghclibdir}/runghc +%{ghclibdir}/platformConstants %{ghclibdir}/settings %{ghclibdir}/template-hsc.h %{ghclibdir}/unlit @@ -513,7 +506,7 @@ fi %{_bindir}/ghc-doc-index %{_bindir}/haddock %{_bindir}/haddock-ghc-%{version} -%{ghclibdir}/haddock +%{ghclibdir}/bin/haddock %{ghclibdir}/html %{ghclibdir}/latex %if %{undefined without_manual} @@ -547,6 +540,13 @@ fi %changelog +* Sun Aug 3 2014 Jens Petersen - 7.8.3-38 +- update to 7.8.3 +- https://www.haskell.org/ghc/docs/7.8.3/html/users_guide/release-7-8-1.html +- https://www.haskell.org/ghc/docs/7.8.3/html/users_guide/release-7-8-2.html +- https://www.haskell.org/ghc/docs/7.8.3/html/users_guide/release-7-8-3.html +- bootstrap build + * Tue Jul 15 2014 Jens Petersen - 7.6.3-25 - configure ARM with VFPv3D16 and without NEON (#995419) - only apply the Cabal unversion docdir patch to F21 and later diff --git a/sources b/sources index 40df58f..7878910 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -986d1f90ca30d60f7b2820d75c6b8ea7 ghc-7.6.3-src.tar.bz2 -66aa6177a31cc4b9d7eeb55cb1514918 ghc-7.6.3-testsuite.tar.bz2 +5e34b2a29564596c9ed83fb8667b47d4 ghc-7.8.3-src.tar.xz +7ca72a039d44ca2586c02863392b5dce ghc-7.8.3-testsuite.tar.xz