Revert back to ghc-7.8 and update to 7.8.4

version bumps for base and Cabal

This reverts commit 083d826dd60e6a529308f038d8fa6a1900729a3f.

Conflicts:
	ghc.spec
epel9
Jens Petersen 10 years ago committed by Jens Petersen
parent ecce5dd44b
commit 7a3899d9ad

2
.gitignore vendored

@ -14,3 +14,5 @@ testsuite-6.12.3.tar.bz2
/ghc-7.6.3/
/ghc-7.8.3-src.tar.xz
/ghc-7.8.3-testsuite.tar.xz
/ghc-7.8.4-src.tar.xz
/ghc-7.8.4-testsuite.tar.xz

@ -0,0 +1,37 @@
From 08a38628f29df63ac842f4d083efb414f42d7bff Mon Sep 17 00:00:00 2001
From: "Edward Z. Yang" <ezyang@mit.edu>
Date: Tue, 9 Jul 2013 00:01:43 -0700
Subject: [PATCH] Disable executable stack for the linker note, fixing #703
(again)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
---
compiler/main/DriverPipeline.hs | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 67377e6..26425ae 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1640,7 +1640,17 @@ mkNoteObjsToLinkIntoBinary dflags dep_packages = do
text elfSectionNote,
text "\n",
- text "\t.ascii \"", info', text "\"\n" ]
+ text "\t.ascii \"", info', text "\"\n",
+
+ -- ALL generated assembly must have this section to disable
+ -- executable stacks. See also
+ -- compiler/nativeGen/AsmCodeGen.lhs for another instance
+ -- where we need to do this.
+ (if platformHasGnuNonexecStack (targetPlatform dflags)
+ then text ".section .note.GNU-stack,\"\",@progbits\n"
+ else empty)
+
+ ]
where
info' = text $ escape info
--
1.8.1.2

@ -0,0 +1,12 @@
--- ghc-7.8.3/libraries/Cabal/Cabal/Distribution/Simple/Install.hs~ 2014-07-10 13:34:21.000000000 +0900
+++ ghc-7.8.3/libraries/Cabal/Cabal/Distribution/Simple/Install.hs 2014-08-29 16:48:12.621694879 +0900
@@ -148,8 +148,7 @@
notice verbosity ("Installing executable(s) in " ++ binPref)
inPath <- isInSearchPath binPref
when (not inPath) $
- warn verbosity ("The directory " ++ binPref
- ++ " is not in the system search path.")
+ warn verbosity ("Executable installed in " ++ binPref)
-- install include files for all compilers - they may be needed to compile
-- haskell files (using the CPP extension)

@ -0,0 +1,32 @@
commit 08a38628f29df63ac842f4d083efb414f42d7bff
Author: Edward Z. Yang <ezyang@mit.edu>
Date: Tue Jul 9 00:01:43 2013 -0700
Disable executable stack for the linker note, fixing #703 (again)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Modified compiler/main/DriverPipeline.hs
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 67377e6..26425ae 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1640,7 +1640,17 @@ mkNoteObjsToLinkIntoBinary dflags dep_packages = do
text elfSectionNote,
text "\n",
- text "\t.ascii \"", info', text "\"\n" ]
+ text "\t.ascii \"", info', text "\"\n",
+
+ -- ALL generated assembly must have this section to disable
+ -- executable stacks. See also
+ -- compiler/nativeGen/AsmCodeGen.lhs for another instance
+ -- where we need to do this.
+ (if platformHasGnuNonexecStack (targetPlatform dflags)
+ then text ".section .note.GNU-stack,\"\",@progbits\n"
+ else empty)
+
+ ]
where
info' = text $ escape info

@ -1,23 +1,27 @@
Description: Add arm64 support
Author: Karel Gardas <karel.gardas@centrum.cz>
Author: Colin Watson <cjwatson@ubuntu.com>
commit c29bf984dd20431cd4344e8a5c444d7a5be08389
Author: Colin Watson <cjwatson@debian.org>
Date: Mon Apr 21 22:26:56 2014 -0500
Bug: https://ghc.haskell.org/trac/ghc/ticket/7942
Last-Update: 2014-04-04
Index: b/aclocal.m4
ghc: initial AArch64 patches
Signed-off-by: Austin Seipp <austin@well-typed.com>
Index: ghc-7.8.3/aclocal.m4
===================================================================
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -173,7 +173,7 @@
--- ghc-7.8.3.orig/aclocal.m4 2014-07-10 10:16:42.533187516 +0200
+++ ghc-7.8.3/aclocal.m4 2014-07-10 10:16:42.529187516 +0200
@@ -197,6 +197,9 @@
GET_ARM_ISA()
test -z "[$]2" || eval "[$]2=\"ArchARM {armISA = \$ARM_ISA, armISAExt = \$ARM_ISA_EXT, armABI = \$ARM_ABI}\""
;;
- alpha|mips|mipseb|mipsel|hppa|hppa1_1|ia64|m68k|rs6000|s390|s390x|sparc64|vax)
+ aarch64|alpha|mips|mipseb|mipsel|hppa|hppa1_1|ia64|m68k|rs6000|s390|s390x|sparc64|vax)
test -z "[$]2" || eval "[$]2=ArchUnknown"
+ aarch64)
+ test -z "[$]2" || eval "[$]2=ArchARM64"
+ ;;
alpha)
test -z "[$]2" || eval "[$]2=ArchAlpha"
;;
*)
@@ -1835,6 +1835,9 @@
@@ -1862,6 +1865,9 @@
# converts cpu from gnu to ghc naming, and assigns the result to $target_var
AC_DEFUN([GHC_CONVERT_CPU],[
case "$1" in
@ -27,29 +31,161 @@ Index: b/aclocal.m4
alpha*)
$2="alpha"
;;
Index: b/includes/stg/MachRegs.h
Index: ghc-7.8.3/compiler/nativeGen/AsmCodeGen.lhs
===================================================================
--- a/includes/stg/MachRegs.h
+++ b/includes/stg/MachRegs.h
@@ -43,6 +43,7 @@
#define powerpc_REGS (powerpc_TARGET_ARCH || powerpc64_TARGET_ARCH || rs6000_TARGET_ARCH)
#define sparc_REGS sparc_TARGET_ARCH
#define arm_REGS arm_TARGET_ARCH
+#define aarch64_REGS aarch64_TARGET_ARCH
#define darwin_REGS darwin_TARGET_OS
#else
#define i386_REGS i386_HOST_ARCH
@@ -50,6 +51,7 @@
#define powerpc_REGS (powerpc_HOST_ARCH || powerpc64_HOST_ARCH || rs6000_HOST_ARCH)
#define sparc_REGS sparc_HOST_ARCH
#define arm_REGS arm_HOST_ARCH
+#define aarch64_REGS aarch64_HOST_ARCH
#define darwin_REGS darwin_HOST_OS
#endif
@@ -461,6 +463,63 @@
--- ghc-7.8.3.orig/compiler/nativeGen/AsmCodeGen.lhs 2014-07-10 10:16:42.533187516 +0200
+++ ghc-7.8.3/compiler/nativeGen/AsmCodeGen.lhs 2014-07-10 10:16:42.529187516 +0200
@@ -166,6 +166,7 @@
ArchPPC -> nCG' (ppcNcgImpl dflags)
ArchSPARC -> nCG' (sparcNcgImpl dflags)
ArchARM {} -> panic "nativeCodeGen: No NCG for ARM"
+ ArchARM64 -> panic "nativeCodeGen: No NCG for ARM64"
ArchPPC_64 -> panic "nativeCodeGen: No NCG for PPC 64"
ArchAlpha -> panic "nativeCodeGen: No NCG for Alpha"
ArchMipseb -> panic "nativeCodeGen: No NCG for mipseb"
Index: ghc-7.8.3/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
===================================================================
--- ghc-7.8.3.orig/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs 2014-07-10 10:16:42.533187516 +0200
+++ ghc-7.8.3/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs 2014-07-10 10:16:42.529187516 +0200
@@ -113,6 +113,7 @@
ArchSPARC -> 14
ArchPPC_64 -> panic "trivColorable ArchPPC_64"
ArchARM _ _ _ -> panic "trivColorable ArchARM"
+ ArchARM64 -> panic "trivColorable ArchARM64"
ArchAlpha -> panic "trivColorable ArchAlpha"
ArchMipseb -> panic "trivColorable ArchMipseb"
ArchMipsel -> panic "trivColorable ArchMipsel"
@@ -137,6 +138,7 @@
ArchSPARC -> 22
ArchPPC_64 -> panic "trivColorable ArchPPC_64"
ArchARM _ _ _ -> panic "trivColorable ArchARM"
+ ArchARM64 -> panic "trivColorable ArchARM64"
ArchAlpha -> panic "trivColorable ArchAlpha"
ArchMipseb -> panic "trivColorable ArchMipseb"
ArchMipsel -> panic "trivColorable ArchMipsel"
@@ -161,6 +163,7 @@
ArchSPARC -> 11
ArchPPC_64 -> panic "trivColorable ArchPPC_64"
ArchARM _ _ _ -> panic "trivColorable ArchARM"
+ ArchARM64 -> panic "trivColorable ArchARM64"
ArchAlpha -> panic "trivColorable ArchAlpha"
ArchMipseb -> panic "trivColorable ArchMipseb"
ArchMipsel -> panic "trivColorable ArchMipsel"
@@ -185,6 +188,7 @@
ArchSPARC -> 0
ArchPPC_64 -> panic "trivColorable ArchPPC_64"
ArchARM _ _ _ -> panic "trivColorable ArchARM"
+ ArchARM64 -> panic "trivColorable ArchARM64"
ArchAlpha -> panic "trivColorable ArchAlpha"
ArchMipseb -> panic "trivColorable ArchMipseb"
ArchMipsel -> panic "trivColorable ArchMipsel"
Index: ghc-7.8.3/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs
===================================================================
--- ghc-7.8.3.orig/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs 2014-07-10 10:16:42.533187516 +0200
+++ ghc-7.8.3/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs 2014-07-10 10:16:42.529187516 +0200
@@ -74,6 +74,7 @@
ArchPPC -> PPC.Instr.maxSpillSlots dflags
ArchSPARC -> SPARC.Instr.maxSpillSlots dflags
ArchARM _ _ _ -> panic "maxSpillSlots ArchARM"
+ ArchARM64 -> panic "maxSpillSlots ArchARM64"
ArchPPC_64 -> panic "maxSpillSlots ArchPPC_64"
ArchAlpha -> panic "maxSpillSlots ArchAlpha"
ArchMipseb -> panic "maxSpillSlots ArchMipseb"
Index: ghc-7.8.3/compiler/nativeGen/RegAlloc/Linear/Main.hs
===================================================================
--- ghc-7.8.3.orig/compiler/nativeGen/RegAlloc/Linear/Main.hs 2014-07-10 10:16:42.533187516 +0200
+++ ghc-7.8.3/compiler/nativeGen/RegAlloc/Linear/Main.hs 2014-07-10 10:16:42.529187516 +0200
@@ -207,6 +207,7 @@
ArchSPARC -> linearRegAlloc' dflags (frInitFreeRegs platform :: SPARC.FreeRegs) first_id block_live sccs
ArchPPC -> linearRegAlloc' dflags (frInitFreeRegs platform :: PPC.FreeRegs) first_id block_live sccs
ArchARM _ _ _ -> panic "linearRegAlloc ArchARM"
+ ArchARM64 -> panic "linearRegAlloc ArchARM64"
ArchPPC_64 -> panic "linearRegAlloc ArchPPC_64"
ArchAlpha -> panic "linearRegAlloc ArchAlpha"
ArchMipseb -> panic "linearRegAlloc ArchMipseb"
Index: ghc-7.8.3/compiler/nativeGen/TargetReg.hs
===================================================================
--- ghc-7.8.3.orig/compiler/nativeGen/TargetReg.hs 2014-07-10 10:16:42.533187516 +0200
+++ ghc-7.8.3/compiler/nativeGen/TargetReg.hs 2014-07-10 10:16:42.529187516 +0200
@@ -54,6 +54,7 @@
ArchSPARC -> SPARC.virtualRegSqueeze
ArchPPC_64 -> panic "targetVirtualRegSqueeze ArchPPC_64"
ArchARM _ _ _ -> panic "targetVirtualRegSqueeze ArchARM"
+ ArchARM64 -> panic "targetVirtualRegSqueeze ArchARM64"
ArchAlpha -> panic "targetVirtualRegSqueeze ArchAlpha"
ArchMipseb -> panic "targetVirtualRegSqueeze ArchMipseb"
ArchMipsel -> panic "targetVirtualRegSqueeze ArchMipsel"
@@ -70,6 +71,7 @@
ArchSPARC -> SPARC.realRegSqueeze
ArchPPC_64 -> panic "targetRealRegSqueeze ArchPPC_64"
ArchARM _ _ _ -> panic "targetRealRegSqueeze ArchARM"
+ ArchARM64 -> panic "targetRealRegSqueeze ArchARM64"
ArchAlpha -> panic "targetRealRegSqueeze ArchAlpha"
ArchMipseb -> panic "targetRealRegSqueeze ArchMipseb"
ArchMipsel -> panic "targetRealRegSqueeze ArchMipsel"
@@ -85,6 +87,7 @@
ArchSPARC -> SPARC.classOfRealReg
ArchPPC_64 -> panic "targetClassOfRealReg ArchPPC_64"
ArchARM _ _ _ -> panic "targetClassOfRealReg ArchARM"
+ ArchARM64 -> panic "targetClassOfRealReg ArchARM64"
ArchAlpha -> panic "targetClassOfRealReg ArchAlpha"
ArchMipseb -> panic "targetClassOfRealReg ArchMipseb"
ArchMipsel -> panic "targetClassOfRealReg ArchMipsel"
@@ -100,6 +103,7 @@
ArchSPARC -> SPARC.mkVirtualReg
ArchPPC_64 -> panic "targetMkVirtualReg ArchPPC_64"
ArchARM _ _ _ -> panic "targetMkVirtualReg ArchARM"
+ ArchARM64 -> panic "targetMkVirtualReg ArchARM64"
ArchAlpha -> panic "targetMkVirtualReg ArchAlpha"
ArchMipseb -> panic "targetMkVirtualReg ArchMipseb"
ArchMipsel -> panic "targetMkVirtualReg ArchMipsel"
@@ -115,6 +119,7 @@
ArchSPARC -> SPARC.regDotColor
ArchPPC_64 -> panic "targetRegDotColor ArchPPC_64"
ArchARM _ _ _ -> panic "targetRegDotColor ArchARM"
+ ArchARM64 -> panic "targetRegDotColor ArchARM64"
ArchAlpha -> panic "targetRegDotColor ArchAlpha"
ArchMipseb -> panic "targetRegDotColor ArchMipseb"
ArchMipsel -> panic "targetRegDotColor ArchMipsel"
Index: ghc-7.8.3/compiler/utils/Platform.hs
===================================================================
--- ghc-7.8.3.orig/compiler/utils/Platform.hs 2014-07-10 10:16:42.533187516 +0200
+++ ghc-7.8.3/compiler/utils/Platform.hs 2014-07-10 10:16:42.529187516 +0200
@@ -52,6 +52,7 @@
, armISAExt :: [ArmISAExt]
, armABI :: ArmABI
}
+ | ArchARM64
| ArchAlpha
| ArchMipseb
| ArchMipsel
Index: ghc-7.8.3/includes/stg/HaskellMachRegs.h
===================================================================
--- ghc-7.8.3.orig/includes/stg/HaskellMachRegs.h 2014-07-10 10:16:42.533187516 +0200
+++ ghc-7.8.3/includes/stg/HaskellMachRegs.h 2014-07-10 10:16:42.533187516 +0200
@@ -38,6 +38,7 @@
#define MACHREGS_powerpc (powerpc_TARGET_ARCH || powerpc64_TARGET_ARCH || rs6000_TARGET_ARCH)
#define MACHREGS_sparc sparc_TARGET_ARCH
#define MACHREGS_arm arm_TARGET_ARCH
+#define MACHREGS_aarch64 aarch64_TARGET_ARCH
#define MACHREGS_darwin darwin_TARGET_OS
#endif /* arm */
#endif
Index: ghc-7.8.3/includes/stg/MachRegs.h
===================================================================
--- ghc-7.8.3.orig/includes/stg/MachRegs.h 2014-07-10 10:16:42.533187516 +0200
+++ ghc-7.8.3/includes/stg/MachRegs.h 2014-07-10 10:16:42.533187516 +0200
@@ -1,6 +1,6 @@
/* -----------------------------------------------------------------------------
*
- * (c) The GHC Team, 1998-2011
+ * (c) The GHC Team, 1998-2014
*
* Registers used in STG code. Might or might not correspond to
* actual machine registers.
@@ -531,6 +531,61 @@
#define REG_D2 d11
#endif
+/* -----------------------------------------------------------------------------
+ The ARMv8/AArch64 ABI register mapping
@ -83,7 +219,7 @@ Index: b/includes/stg/MachRegs.h
+
+ ----------------------------------------------------------------------------- */
+
+#if aarch64_REGS
+#elif MACHREGS_aarch64
+
+#define REG(x) __asm__(#x)
+
@ -106,16 +242,14 @@ Index: b/includes/stg/MachRegs.h
+#define REG_D1 d12
+#define REG_D2 d13
+
+#endif /* aarch64 */
+
#endif /* NO_REGS */
#else
/* -----------------------------------------------------------------------------
Index: b/rts/StgCRun.c
#error Cannot find platform to give register info for
Index: ghc-7.8.3/rts/StgCRun.c
===================================================================
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -725,4 +725,70 @@
--- ghc-7.8.3.orig/rts/StgCRun.c 2014-07-10 10:16:42.533187516 +0200
+++ ghc-7.8.3/rts/StgCRun.c 2014-07-10 10:16:42.533187516 +0200
@@ -748,4 +748,70 @@
}
#endif

@ -1,7 +1,7 @@
--- ghc-7.6.3/aclocal.m4~ 2013-04-19 06:22:46.000000000 +0900
+++ ghc-7.6.3/aclocal.m4 2014-07-15 18:22:12.308929288 +0900
@@ -349,7 +349,7 @@
],
--- ghc-7.8.3/aclocal.m4~ 2014-07-10 13:27:16.000000000 +0900
+++ ghc-7.8.3/aclocal.m4 2014-11-05 12:19:08.530044128 +0900
@@ -408,7 +408,7 @@
)],
[changequote(, )dnl
ARM_ISA=ARMv7
- ARM_ISA_EXT="[VFPv3,NEON]"

@ -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"
}

@ -1,41 +0,0 @@
Description: Add ppc64el support
Author: Colin Watson <cjwatson@ubuntu.com>
Bug: https://ghc.haskell.org/trac/ghc/ticket/8965
Last-Update: 2014-04-12
Index: b/aclocal.m4
===================================================================
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -173,7 +173,7 @@
GET_ARM_ISA()
test -z "[$]2" || eval "[$]2=\"ArchARM {armISA = \$ARM_ISA, armISAExt = \$ARM_ISA_EXT, armABI = \$ARM_ABI}\""
;;
- alpha|mips|mipseb|mipsel|hppa|hppa1_1|ia64|m68k|rs6000|s390|s390x|sparc64|vax)
+ alpha|mips|mipseb|mipsel|hppa|hppa1_1|ia64|m68k|powerpc64le|rs6000|s390|s390x|sparc64|vax)
test -z "[$]2" || eval "[$]2=ArchUnknown"
;;
*)
@@ -1868,6 +1868,9 @@
mips*)
$2="mips"
;;
+ powerpc64le*)
+ $2="powerpc64le"
+ ;;
powerpc64*)
$2="powerpc64"
;;
Index: b/includes/Stg.h
===================================================================
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -213,7 +213,7 @@
#define II_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
#define IF_(f) static StgFunPtr GNUC3_ATTRIBUTE(used) f(void)
#define FN_(f) StgFunPtr f(void)
-#define EF_(f) extern StgFunPtr f(void)
+#define EF_(f) extern StgFunPtr f()
/* -----------------------------------------------------------------------------
Tail calls

@ -1,96 +1,93 @@
# 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
# make sure to turn on shared libs for all arches
# (for building on releases earlier than F22)
%if %{defined ghc_without_shared}
%undefine ghc_without_shared
%endif
%global space %(echo -n ' ')
%global BSDHaskellReport BSD%{space}and%{space}HaskellReport
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.4
# 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: 28%{?dist}
# xhtml moved from haskell-platform to ghc-7.8.3
Release: 39%{?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
# NB: value affects ABI hash of libHSghc!
# will probably be needed again for llvm-3.5
#Patch14: ghc-7.6.3-LlvmCodeGen-llvm-version-warning.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
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
Patch20: ghc-glibc-2.20_BSD_SOURCE.patch
# Debian patch
Patch21: ghc-arm64.patch
Patch22: ghc-7.6.3-armv7-VFPv3D16--NEON.patch
Patch22: ghc-armv7-VFPv3D16--NEON.patch
Patch23: ghc-7.8.3-Cabal-install-PATH-warning.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.5
%global array_ver 0.5.0.0
%global base_ver 4.7.0.2
%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
# %{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64
# and retired arches: alpha sparcv9 armv5tel
# see ghc_arches defined in /etc/rpm/macros.ghc-srpm by redhat-rpm-macros
ExcludeArch: sparc64
Obsoletes: ghc-dph-base < 0.5, ghc-dph-base-devel < 0.5, ghc-dph-base-prof < 0.5
@ -103,11 +100,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} >= 19 || 0%{?rhel} >= 7
%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 +114,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
@ -126,11 +124,7 @@ BuildRequires: python
%ifarch armv7hl armv5tel
BuildRequires: llvm34
%endif
%ifarch ppc64le aarch64
# for patch19 and patch21
BuildRequires: autoconf
%endif
%ifarch armv7hl
%ifarch armv7hl aarch64
# patch22
BuildRequires: autoconf, automake
%endif
@ -194,6 +188,7 @@ The package provides a cronjob for re-indexing installed library development
documention.
%endif
# ghclibdir also needs ghc_version_override for bootstrapping (ghc-deps.sh)
%global ghc_version_override %{version}
# currently only F21+ ghc-rpm-macros has ghc.attr
@ -220,6 +215,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}
@ -231,8 +227,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}
@ -260,44 +259,21 @@ 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
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
%ifarch ppc64 s390x
%patch15 -p1 -b .orig
#%%patch14 -p1 -b .orig
%endif
# unversion pkgdoc htmldir
%if 0%{?fedora} >= 21
%patch16 -p1 -b .orig
%endif
%patch17 -p0 -b .orig
#%%patch18 -p1 -b .orig
%ifarch ppc64le
%patch19 -p1 -b .orig
%endif
%patch20 -p1 -b .orig
%ifarch aarch64
@ -308,6 +284,7 @@ ln -s $(pkg-config --variable=includedir libffi)/*.h rts/dist/build
%patch22 -p1 -b .orig
%endif
%patch23 -p1 -b .orig
%global gen_contents_index gen_contents_index.orig
%if %{undefined without_haddock}
@ -335,7 +312,7 @@ BuildFlavour = quick-llvm
BuildFlavour = quick
%endif
%endif
GhcLibWays = v %{!?ghc_without_shared:dyn} %{!?without_prof:p}
GhcLibWays = v dyn %{!?without_prof:p}
%if %{defined without_haddock}
HADDOCK_DOCS = NO
%endif
@ -349,29 +326,32 @@ BUILD_DOCBOOK_HTML = NO
#EXTRA_HC_OPTS=-debug
EOF
# 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
%ifarch ppc64le aarch64 armv7hl
%ifarch aarch64
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
done
%endif
%ifarch aarch64 armv7hl
autoreconf
%endif
export CFLAGS="${CFLAGS:-%optflags}"
export LDFLAGS="${LDFLAGS:-%__global_ldflags}"
# * %%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 --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} \
--bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
--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 \
%ifarch armv7hl armv5tel
--with-llc=%{_bindir}/llc-3.4 --with-opt=%{_bindir}/opt-3.4 \
%endif
%{nil}
# 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
@ -403,11 +383,13 @@ echo "%doc libraries/LICENSE.%1" >> ghc-%2.files
%merge_filelist bin-package-db ghc
# add rts libs
%if %{undefined ghc_without_shared}
ls %{buildroot}%{ghclibdir}/libHS*.so >> ghc-base.files
echo "%dir %{ghclibdir}/rts-1.0" >> ghc-base.files
ls %{buildroot}%{ghclibdir}/rts-1.0/libHS*.so >> ghc-base.files
sed -i -e "s|^%{buildroot}||g" ghc-base.files
%endif
ls -d %{buildroot}%{ghclibdir}/libHS*.a %{buildroot}%{ghclibdir}/package.conf.d/builtin_*.conf %{buildroot}%{ghclibdir}/include >> ghc-base-devel.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
@ -434,8 +416,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
@ -451,12 +437,10 @@ echo 'main = putStrLn "Foo"' > testghc/foo.hs
$GHC testghc/foo.hs -o testghc/foo -O2
[ "$(testghc/foo)" = "Foo" ]
rm testghc/*
%if %{undefined ghc_without_shared}
echo 'main = putStrLn "Foo"' > testghc/foo.hs
$GHC testghc/foo.hs -o testghc/foo -dynamic
[ "$(testghc/foo)" = "Foo" ]
rm testghc/*
%endif
%if %{undefined without_testsuite}
make test
%endif
@ -490,13 +474,15 @@ fi
%files
%files compiler
%doc ANNOUNCE HACKING LICENSE README
%doc ANNOUNCE LICENSE
%{_bindir}/ghc
%{_bindir}/ghc-%{version}
%{_bindir}/ghc-pkg
%{_bindir}/ghc-pkg-%{version}
%ifarch %ghc_arches_with_ghci
%{_bindir}/ghci
%{_bindir}/ghci-%{version}
%endif
%{_bindir}/hp2ps
%{_bindir}/hpc
%ghost %{_bindir}/hsc2hs
@ -504,18 +490,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
@ -526,7 +516,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}
@ -560,6 +550,18 @@ fi
%changelog
* Sat Jan 17 2015 Jens Petersen <petersen@redhat.com> - 7.8.4-39
- update to 7.8.4
- bump release over haskell-platform xhtml
- https://www.haskell.org/ghc/docs/7.8.4/html/users_guide/release-7-8-1.html
- https://www.haskell.org/ghc/docs/7.8.4/html/users_guide/release-7-8-2.html
- https://www.haskell.org/ghc/docs/7.8.4/html/users_guide/release-7-8-3.html
- https://www.haskell.org/ghc/docs/7.8.4/html/users_guide/release-7-8-4.html
- bootstrap build
- provides haskeline, terminfo and xhtml libraries
- shared libraries on all archs
- bindir/ghci only on ghc_arches_with_ghci
* Tue Nov 18 2014 Jens Petersen <petersen@redhat.com> - 7.6.3-28
- remove the build hack to switch from llvm to llvm34 (#1161049)
- use rpm internal dependency generator with ghc.attr on F21+

@ -1,2 +1,2 @@
986d1f90ca30d60f7b2820d75c6b8ea7 ghc-7.6.3-src.tar.bz2
66aa6177a31cc4b9d7eeb55cb1514918 ghc-7.6.3-testsuite.tar.bz2
91f74cf9d813603cc3145528db4bbead ghc-7.8.4-src.tar.xz
3cc3353d99518be7e7b2d78ebd5460b5 ghc-7.8.4-testsuite.tar.xz

Loading…
Cancel
Save