From 9d76b15c80e1d878be079d62c4c7c2ee392e8e0d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 17 Nov 2014 12:24:08 +0900 Subject: [PATCH] revert to 7.6.3-26 (current f21) --- ...executable-stack-for-the-linker-note.patch | 37 --- ...ch => ghc-7.6.3-armv7-VFPv3D16--NEON.patch | 8 +- ghc-7.8.3-Cabal-install-PATH-warning.patch | 12 - ghc-NCG-no-execstack.patch | 32 --- ghc-arm64.patch | 220 ++++------------ ghc-cabal-unversion-docdir.patch | 26 +- ghc-doc-index | 2 +- ghc-ppc64el.patch | 41 +++ ghc.spec | 241 +++++++++--------- sources | 4 +- 10 files changed, 220 insertions(+), 403 deletions(-) delete mode 100644 ghc-7.6-driver-Disable-executable-stack-for-the-linker-note.patch rename ghc-armv7-VFPv3D16--NEON.patch => ghc-7.6.3-armv7-VFPv3D16--NEON.patch (58%) delete mode 100644 ghc-7.8.3-Cabal-install-PATH-warning.patch delete mode 100644 ghc-NCG-no-execstack.patch create mode 100644 ghc-ppc64el.patch diff --git a/ghc-7.6-driver-Disable-executable-stack-for-the-linker-note.patch b/ghc-7.6-driver-Disable-executable-stack-for-the-linker-note.patch deleted file mode 100644 index 63583af..0000000 --- a/ghc-7.6-driver-Disable-executable-stack-for-the-linker-note.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 08a38628f29df63ac842f4d083efb414f42d7bff Mon Sep 17 00:00:00 2001 -From: "Edward Z. Yang" -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 ---- - 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 - diff --git a/ghc-armv7-VFPv3D16--NEON.patch b/ghc-7.6.3-armv7-VFPv3D16--NEON.patch similarity index 58% rename from ghc-armv7-VFPv3D16--NEON.patch rename to ghc-7.6.3-armv7-VFPv3D16--NEON.patch index e51a353..6412ff5 100644 --- a/ghc-armv7-VFPv3D16--NEON.patch +++ b/ghc-7.6.3-armv7-VFPv3D16--NEON.patch @@ -1,7 +1,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 @@ - )], +--- 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 @@ + ], [changequote(, )dnl ARM_ISA=ARMv7 - ARM_ISA_EXT="[VFPv3,NEON]" diff --git a/ghc-7.8.3-Cabal-install-PATH-warning.patch b/ghc-7.8.3-Cabal-install-PATH-warning.patch deleted file mode 100644 index e7ef6e1..0000000 --- a/ghc-7.8.3-Cabal-install-PATH-warning.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- 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) diff --git a/ghc-NCG-no-execstack.patch b/ghc-NCG-no-execstack.patch deleted file mode 100644 index 40b6ba6..0000000 --- a/ghc-NCG-no-execstack.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit 08a38628f29df63ac842f4d083efb414f42d7bff -Author: Edward Z. Yang -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 - - 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 - diff --git a/ghc-arm64.patch b/ghc-arm64.patch index 7652727..06a7019 100644 --- a/ghc-arm64.patch +++ b/ghc-arm64.patch @@ -1,27 +1,23 @@ -commit c29bf984dd20431cd4344e8a5c444d7a5be08389 -Author: Colin Watson -Date: Mon Apr 21 22:26:56 2014 -0500 +Description: Add arm64 support +Author: Karel Gardas +Author: Colin Watson Bug: https://ghc.haskell.org/trac/ghc/ticket/7942 +Last-Update: 2014-04-04 - ghc: initial AArch64 patches - - Signed-off-by: Austin Seipp - -Index: ghc-7.8.3/aclocal.m4 +Index: b/aclocal.m4 =================================================================== ---- 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 @@ +--- 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}\"" ;; -+ aarch64) -+ test -z "[$]2" || eval "[$]2=ArchARM64" -+ ;; - alpha) - test -z "[$]2" || eval "[$]2=ArchAlpha" +- 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" ;; -@@ -1862,6 +1865,9 @@ + *) +@@ -1835,6 +1835,9 @@ # converts cpu from gnu to ghc naming, and assigns the result to $target_var AC_DEFUN([GHC_CONVERT_CPU],[ case "$1" in @@ -31,162 +27,30 @@ Index: ghc-7.8.3/aclocal.m4 alpha*) $2="alpha" ;; -Index: ghc-7.8.3/compiler/nativeGen/AsmCodeGen.lhs -=================================================================== ---- 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 +Index: b/includes/stg/MachRegs.h =================================================================== ---- 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 -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 +--- 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 @@ + + #endif /* arm */ + +/* ----------------------------------------------------------------------------- + The ARMv8/AArch64 ABI register mapping + @@ -219,7 +83,7 @@ Index: ghc-7.8.3/includes/stg/MachRegs.h + + ----------------------------------------------------------------------------- */ + -+#elif MACHREGS_aarch64 ++#if aarch64_REGS + +#define REG(x) __asm__(#x) + @@ -242,14 +106,16 @@ Index: ghc-7.8.3/includes/stg/MachRegs.h +#define REG_D1 d12 +#define REG_D2 d13 + - #else ++#endif /* aarch64 */ ++ + #endif /* NO_REGS */ - #error Cannot find platform to give register info for -Index: ghc-7.8.3/rts/StgCRun.c + /* ----------------------------------------------------------------------------- +Index: b/rts/StgCRun.c =================================================================== ---- 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 @@ +--- a/rts/StgCRun.c ++++ b/rts/StgCRun.c +@@ -725,4 +725,70 @@ } #endif diff --git a/ghc-cabal-unversion-docdir.patch b/ghc-cabal-unversion-docdir.patch index 9d0b026..0aefeb5 100644 --- a/ghc-cabal-unversion-docdir.patch +++ b/ghc-cabal-unversion-docdir.patch @@ -1,13 +1,13 @@ ---- 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" - } - +--- 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 diff --git a/ghc-doc-index b/ghc-doc-index index a0223fa..6105d7e 100755 --- a/ghc-doc-index +++ b/ghc-doc-index @@ -34,5 +34,5 @@ if [ -x "gen_contents_index" -a ! -r "$PKGDIRCACHE.new" -o -n "$DIR_DIFF" ]; the fi if [ -f $PKGDIRCACHE.new ]; then - mv -f $PKGDIRCACHE.new $PKGDIRCACHE + mv -f $PKGDIRCACHE{.new,} fi diff --git a/ghc-ppc64el.patch b/ghc-ppc64el.patch new file mode 100644 index 0000000..9841054 --- /dev/null +++ b/ghc-ppc64el.patch @@ -0,0 +1,41 @@ +Description: Add ppc64el support +Author: Colin Watson +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 diff --git a/ghc.spec b/ghc.spec index 6c63e70..44e4922 100644 --- a/ghc.spec +++ b/ghc.spec @@ -1,92 +1,96 @@ +# 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 -%global without_prof 1 -%if 0%{?fedora} >= 22 -%{?ghc_bootstrap} -%else -%{?ghc_test} -%endif +#%%global ghc_bootstrapping 1 +#%%global without_testsuite 1 +### either: +#%%{?ghc_bootstrap} +### or for shared libs: +#%%{?ghc_test} ### uncomment to generate haddocks for bootstrap #%%undefine without_haddock -# need to enable shared libs for all arches -%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.8.3 +Version: 7.6.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 -# xhtml moved from haskell-platform to ghc-7.8.3 -Release: 38%{?dist} +Release: 26%{?dist} Summary: Glasgow Haskell Compiler License: %BSDHaskellReport URL: http://haskell.org/ghc/ -Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.xz +Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2 %if %{undefined without_testsuite} -Source2: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-testsuite.tar.xz +Source2: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-testsuite.tar.bz2 %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 +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 # stop warnings about unsupported version of llvm -# 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 +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 # 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-armv7-VFPv3D16--NEON.patch -Patch23: ghc-7.8.3-Cabal-install-PATH-warning.patch +Patch22: ghc-7.6.3-armv7-VFPv3D16--NEON.patch -%global Cabal_ver 1.18.1.3 -%global array_ver 0.5.0.0 -%global base_ver 4.7.0.1 +%global Cabal_ver 1.16.0 +%global array_ver 0.4.0.1 +%global base_ver 4.6.0.1 %global bin_package_db_ver 0.0.0.0 -%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 - +%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 # fedora ghc has been bootstrapped on -# %{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64 -# and retired arches: alpha sparcv9 armv5tel +# %{ix86} x86_64 ppc alpha sparcv9 ppc64 armv7hl armv5tel s390 s390x # 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 @@ -99,12 +103,11 @@ 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 || 0%{?rhel} >= 7 +%if 0%{?fedora} >= 20 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 @@ -113,9 +116,9 @@ BuildRequires: ghc-pretty-devel BuildRequires: ghc-process-devel BuildRequires: gmp-devel BuildRequires: libffi-devel -# for terminfo +# for internal terminfo BuildRequires: ncurses-devel -# for man and docs +# for manpage and docs BuildRequires: libxslt, docbook-style-xsl %if %{undefined without_testsuite} BuildRequires: python @@ -123,7 +126,11 @@ BuildRequires: python %ifarch armv7hl armv5tel BuildRequires: llvm >= 3.0 %endif -%ifarch armv7hl aarch64 +%ifarch ppc64le aarch64 +# for patch19 and patch21 +BuildRequires: autoconf +%endif +%ifarch armv7hl # patch22 BuildRequires: autoconf, automake %endif @@ -187,16 +194,13 @@ 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 F22 ghc-rpm-macros has ghc.attr -%if 0%{?fedora} < 22 # needs ghc_version_override for bootstrapping %global _use_internal_dependency_generator 0 %global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%endif + %global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release} @@ -214,7 +218,6 @@ 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} @@ -226,11 +229,8 @@ 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,21 +258,44 @@ except the ghc library, which is installed by the toplevel ghc metapackage. # gen_contents_index: use absolute path for haddock %patch1 -p1 -b .orig -rm -r libffi-tarballs +# 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 %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 +%patch14 -p1 -b .orig +%endif + +%ifarch ppc64 s390x +%patch15 -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 @@ -283,7 +306,6 @@ rm -r libffi-tarballs %patch22 -p1 -b .orig %endif -%patch23 -p1 -b .orig %global gen_contents_index gen_contents_index.orig %if %{undefined without_haddock} @@ -304,14 +326,8 @@ BuildFlavour = perf %else BuildFlavour = perf-llvm %endif -%else -%ifnarch armv7hl armv5tel -BuildFlavour = quick-llvm -%else -BuildFlavour = quick -%endif %endif -GhcLibWays = v dyn %{!?without_prof:p} +GhcLibWays = v %{!?ghc_without_shared:dyn} %{!?without_prof:p} %if %{defined without_haddock} HADDOCK_DOCS = NO %endif @@ -325,28 +341,24 @@ BUILD_DOCBOOK_HTML = NO #EXTRA_HC_OPTS=-debug EOF -%ifarch aarch64 +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 +%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 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-system-libffi + --with-gcc=%{_bindir}/gcc -# avoid "ghc: hGetContents: invalid argument (invalid byte sequence)" -export LANG=en_US.utf8 -make %{?_smp_mflags} +# utf8 is needed when building with verbose output +LANG=en_US.utf8 make %{?_smp_mflags} %install @@ -378,13 +390,11 @@ 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 -ls %{buildroot}%{ghclibdir}/rts-1.0/libHS*.so >> 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 -d %{buildroot}%{ghclibdir}/rts-1.0/lib*.a %{buildroot}%{ghclibdir}/package.conf.d/builtin_*.conf %{buildroot}%{ghclibdir}/include >> ghc-base-devel.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-devel.files # these are handled as alternatives @@ -411,12 +421,8 @@ 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 @@ -432,10 +438,12 @@ 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 @@ -469,15 +477,13 @@ fi %files %files compiler -%doc ANNOUNCE LICENSE +%doc ANNOUNCE HACKING LICENSE README %{_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 @@ -485,22 +491,18 @@ fi %{_bindir}/runghc* %ghost %{_bindir}/runhaskell %{_bindir}/runhaskell-ghc -%dir %{ghclibdir}/bin -%{ghclibdir}/bin/ghc -%{ghclibdir}/bin/ghc-pkg -%{ghclibdir}/bin/hpc -%{ghclibdir}/bin/hsc2hs -%{ghclibdir}/bin/runghc -# unknown (unregisterized) archs +%{ghclibdir}/ghc +%{ghclibdir}/ghc-pkg +# unknown ("unregisterized") archs %ifnarch ppc64 s390 s390x ppc64le aarch64 %{ghclibdir}/ghc-split %endif %{ghclibdir}/ghc-usage.txt %{ghclibdir}/ghci-usage.txt -%{ghclibdir}/mkGmpDerivedConstants +%{ghclibdir}/hsc2hs %dir %{ghclibdir}/package.conf.d %ghost %{ghclibdir}/package.conf.d/package.cache -%{ghclibdir}/platformConstants +%{ghclibdir}/runghc %{ghclibdir}/settings %{ghclibdir}/template-hsc.h %{ghclibdir}/unlit @@ -511,7 +513,7 @@ fi %{_bindir}/ghc-doc-index %{_bindir}/haddock %{_bindir}/haddock-ghc-%{version} -%{ghclibdir}/bin/haddock +%{ghclibdir}/haddock %{ghclibdir}/html %{ghclibdir}/latex %if %{undefined without_manual} @@ -545,19 +547,8 @@ 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 -- provides haskeline, terminfo and xhtml libraries -- shared libraries on all archs -- use rpm internal dependency generator with ghc.attr on F22 -- fix bash-ism in ghc-doc-index (#1146733) -- do "quick" build when bootstrapping -- setup LDFLAGS -- bindir/ghci only on ghc_arches_with_ghci +* Sat Aug 16 2014 Fedora Release Engineering - 7.6.3-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Tue Jul 15 2014 Jens Petersen - 7.6.3-25 - configure ARM with VFPv3D16 and without NEON (#995419) diff --git a/sources b/sources index 7878910..40df58f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -5e34b2a29564596c9ed83fb8667b47d4 ghc-7.8.3-src.tar.xz -7ca72a039d44ca2586c02863392b5dce ghc-7.8.3-testsuite.tar.xz +986d1f90ca30d60f7b2820d75c6b8ea7 ghc-7.6.3-src.tar.bz2 +66aa6177a31cc4b9d7eeb55cb1514918 ghc-7.6.3-testsuite.tar.bz2