Merge remote-tracking branch 'origin/f20' into epel7

This commit is contained in:
Jens Petersen 2014-03-28 19:22:06 +09:00
commit ac707860ed
17 changed files with 311 additions and 1500 deletions

2
.gitignore vendored
View File

@ -9,3 +9,5 @@ testsuite-6.12.3.tar.bz2
/ghc-7.4.1-src.tar.bz2
/ghc-7.4.2-src.tar.bz2
/ghc-7.4.2-testsuite.tar.bz2
/ghc-7.6.3-src.tar.bz2
/ghc-7.6.3-testsuite.tar.bz2

View File

@ -1,33 +1,23 @@
diff -u ghc-7.2.0.20110728/libraries/Cabal/cabal/Distribution/Simple/GHC.hs.orig ghc-7.2.0.20110728/libraries/Cabal/cabal/Distribution/Simple/GHC.hs
--- ghc-7.2.0.20110728/libraries/Cabal/Cabal/Distribution/Simple/GHC.hs.orig 2011-07-29 02:12:09.000000000 +0900
+++ ghc-7.2.0.20110728/libraries/Cabal/Cabal/Distribution/Simple/GHC.hs 2011-08-05 18:08:05.192042529 +0900
@@ -778,7 +778,10 @@
++ ["-L"++libDir | libDir <- extraLibDirs exeBi]
++ concat [["-framework", f] | f <- PD.frameworks exeBi]
++ if dynExe
- then ["-dynamic"]
+ then ["-dynamic",
+ "-hisuf", "dyn_hi",
+ "-osuf", "dyn_o"
+ ]
else []
++ if profExe
then ["-prof",
@@ -787,13 +790,14 @@
] ++ ghcProfOptions exeBi
else []
--- ghc-7.6.3/libraries/Cabal/Cabal/Distribution/Simple/GHC.hs~ 2013-04-19 06:32:04.000000000 +0900
+++ ghc-7.6.3/libraries/Cabal/Cabal/Distribution/Simple/GHC.hs 2013-06-12 11:35:39.832840754 +0900
@@ -837,6 +837,8 @@
- -- For building exe's for profiling that use TH we actually
+ -- For building exe's for profiling or dynamic that use TH we actually
-- have to build twice, once without profiling and the again
dynamicOpts = vanillaOpts `mappend` mempty {
ghcOptDynamic = toFlag True,
+ ghcOptHiSuffix = toFlag "dyn_hi",
+ ghcOptObjSuffix = toFlag "dyn_o",
ghcOptExtra = ghcSharedOptions exeBi
}
@@ -855,9 +857,9 @@
-- with profiling. This is because the code that TH needs to
-- run at compile time needs to be the vanilla ABI so it can
-- be loaded up and run by the compiler.
- when (withProfExe lbi && EnableExtension TemplateHaskell `elem` allExtensions exeBi)
- (runGhcProg (binArgs False (withDynExe lbi) False))
- when (withProfExe lbi &&
+ when ((withProfExe lbi || withDynExe lbi) &&
+ EnableExtension TemplateHaskell `elem` allExtensions exeBi)
+ (runGhcProg (binArgs False False False))
EnableExtension TemplateHaskell `elem` allExtensions exeBi) $
- runGhcProg exeProfOpts { ghcOptNoLink = toFlag True }
+ runGhcProg vanillaOpts { ghcOptNoLink = toFlag True }
runGhcProg (binArgs True (withDynExe lbi) (withProfExe lbi))
runGhcProg exeOpts { ghcOptOutputFile = toFlag (targetDir </> exeNameReal) }

View File

@ -1,12 +0,0 @@
diff -u ghc-6.12.1/libraries/gen_contents_index\~ ghc-6.12.1/libraries/gen_contents_index
--- ghc-6.12.1/libraries/gen_contents_index~ 2009-12-11 04:11:33.000000000 +1000
+++ ghc-6.12.1/libraries/gen_contents_index 2009-12-12 21:08:02.000000000 +1000
@@ -20,7 +20,7 @@
done
;;
*)
- HADDOCK=../../../../../bin/haddock
+ HADDOCK=/usr/bin/haddock
# We don't want the GHC API to swamp the index
HADDOCK_FILES=`ls -1 */*.haddock | grep -v '/ghc\.haddock' | sort`
for HADDOCK_FILE in $HADDOCK_FILES

View File

@ -0,0 +1,11 @@
--- a/rts/STM.c
+++ b/rts/STM.c
@@ -927,7 +927,7 @@ void stmPreGCHook (Capability *cap) {
static volatile StgInt64 max_commits = 0;
#if defined(THREADED_RTS)
-static volatile StgBool token_locked = FALSE;
+static volatile StgWord token_locked = FALSE;
static void getTokenBatch(Capability *cap) {
while (cas((void *)&token_locked, FALSE, TRUE) == TRUE) { /* nothing */ }

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
--- ghc-7.4.1/libraries/gen_contents_index~ 2012-09-30 16:14:39.368295240 +0900
+++ ghc-7.4.1/libraries/gen_contents_index 2012-10-30 19:12:10.017398594 +0900
@@ -50,7 +50,7 @@
esac
# Now create the combined contents and index pages
-echo $HADDOCK_ARGS
+#echo $HADDOCK_ARGS
$HADDOCK --gen-index --gen-contents -o . \
-t "Haskell Hierarchical Libraries" \
-p "prologue.txt" \

View File

@ -0,0 +1,11 @@
--- ghc-7.6.3/compiler/llvmGen/LlvmCodeGen/Base.hs~ 2013-04-19 06:22:46.000000000 +0900
+++ ghc-7.6.3/compiler/llvmGen/LlvmCodeGen/Base.hs 2013-07-24 17:05:06.491900335 +0900
@@ -151,7 +151,7 @@
minSupportLlvmVersion = 28
maxSupportLlvmVersion :: LlvmVersion
-maxSupportLlvmVersion = 31
+maxSupportLlvmVersion = 33
-- ----------------------------------------------------------------------------
-- * Environment Handling

View File

@ -0,0 +1,11 @@
Index: rts/Adjustor.c
===================================================================
--- rts/Adjustor.c (revision c2870706b29c24ac86ae2a9e2359dd1e4af71ac8)
+++ rts/Adjustor.c (revision 27cf625ab871f34434d9fe86cecf85a31f73f0e5)
@@ -390,5 +390,5 @@
adjustorStub->call[0] = 0xe8;
- *(long*)&adjustorStub->call[1] = ((char*)&adjustorCode) - ((char*)adjustorStub + 5);
+ *(long*)&adjustorStub->call[1] = ((char*)&adjustorCode) - ((char*)code + 5);
adjustorStub->hptr = hptr;
adjustorStub->wptr = wptr;

View File

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

View File

@ -0,0 +1,11 @@
--- ghc-7.6.3/libraries/gen_contents_index~ 2013-04-19 06:22:46.000000000 +0900
+++ ghc-7.6.3/libraries/gen_contents_index 2013-04-22 12:07:48.922152864 +0900
@@ -60,7 +60,7 @@
done
done
else
- HADDOCK=../../../../../bin/haddock
+ HADDOCK=/usr/bin/haddock
# We don't want the GHC API to swamp the index
HADDOCK_FILES=`ls -1 */*.haddock | grep -v '/ghc\.haddock' | sort`
HADDOCK_ARGS="-p prologue.txt"

View File

@ -1,12 +0,0 @@
diff -u ghc-6.12.3/libraries/gen_contents_index\~ ghc-6.12.3/libraries/gen_contents_index
--- ghc-6.12.3/libraries/gen_contents_index~ 2010-09-14 13:03:12.000000000 +1000
+++ ghc-6.12.3/libraries/gen_contents_index 2010-11-04 16:41:32.000000000 +1000
@@ -24,7 +24,7 @@
*)
HADDOCK=/usr/bin/haddock
# We don't want the GHC API to swamp the index
- HADDOCK_FILES=`ls -1 */*.haddock | grep -v '/ghc\.haddock' | sort`
+ HADDOCK_FILES=`ls -1 */*.haddock | grep -v '/ghc\.haddock' | grep -v '/type-level\.haddock' | sort`
for HADDOCK_FILE in $HADDOCK_FILES
do
NAME_VERSION=`echo "$HADDOCK_FILE" | sed 's#/.*##'`

View File

@ -0,0 +1,46 @@
commit db9b63105a541e4ad3f9c55e2cfadf716445ab87
Author: Geoffrey Mainland <gmainlan@microsoft.com>
Date: Wed Jun 12 14:31:49 2013 +0100
Avoid generating empty llvm.used definitions.
LLVM 3.3rc3 complains when the llvm.used global is an empty array, so don't
define llvm.used at all when it would be empty.
Modified compiler/llvmGen/LlvmCodeGen.hs
diff --git a/compiler/llvmGen/LlvmCodeGen.hs b/compiler/llvmGen/LlvmCodeGen.hs
index a157a25..4f2bded 100644
--- a/compiler/llvmGen/LlvmCodeGen.hs
+++ b/compiler/llvmGen/LlvmCodeGen.hs
@@ -117,19 +117,19 @@ cmmProcLlvmGens :: DynFlags -> BufHandle -> UniqSupply -> LlvmEnv -> [RawCmmDecl
-> [[LlvmVar]] -- ^ info tables that need to be marked as 'used'
-> IO ()
-cmmProcLlvmGens _ _ _ _ [] _ []
- = return ()
-
cmmProcLlvmGens dflags h _ _ [] _ ivars
- = let ivars' = concat ivars
- cast x = LMBitc (LMStaticPointer (pVarLift x)) i8Ptr
- ty = (LMArray (length ivars') i8Ptr)
- usedArray = LMStaticArray (map cast ivars') ty
- lmUsed = (LMGlobalVar (fsLit "llvm.used") ty Appending
- (Just $ fsLit "llvm.metadata") Nothing False, Just usedArray)
- in Prt.bufLeftRender h $ {-# SCC "llvm_used_ppr" #-}
- withPprStyleDoc dflags (mkCodeStyle CStyle) $
- pprLlvmData ([lmUsed], [])
+ | null ivars' = return ()
+ | otherwise = Prt.bufLeftRender h $
+ {-# SCC "llvm_used_ppr" #-}
+ withPprStyleDoc dflags (mkCodeStyle CStyle) $
+ pprLlvmData ([lmUsed], [])
+ where
+ ivars' = concat ivars
+ cast x = LMBitc (LMStaticPointer (pVarLift x)) i8Ptr
+ ty = (LMArray (length ivars') i8Ptr)
+ usedArray = LMStaticArray (map cast ivars') ty
+ lmUsed = (LMGlobalVar (fsLit "llvm.used") ty Appending
+ (Just $ fsLit "llvm.metadata") Nothing False, Just usedArray)
cmmProcLlvmGens dflags h us env ((CmmData _ _) : cmms) count ivars
= cmmProcLlvmGens dflags h us env cmms count ivars

View File

@ -1,34 +0,0 @@
diff -up ghc-7.0.2/rts/Linker.c.fix-powerpc ghc-7.0.2/rts/Linker.c
--- ghc-7.0.2/rts/Linker.c.fix-powerpc 2011-02-28 19:10:08.000000000 +0100
+++ ghc-7.0.2/rts/Linker.c 2011-04-25 22:20:10.781092305 +0200
@@ -70,11 +70,12 @@
#include <sys/wait.h>
#endif
-#if defined(linux_HOST_OS ) || defined(freebsd_HOST_OS) || \
- defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS ) || \
- defined(openbsd_HOST_OS ) || \
- ( defined(darwin_HOST_OS ) && !defined(powerpc_HOST_ARCH) )
-/* Don't use mmap on powerpc-apple-darwin as mmap doesn't support
+#if !defined(powerpc_HOST_ARCH) && \
+ ( defined(linux_HOST_OS ) || defined(freebsd_HOST_OS) || \
+ defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS ) || \
+ defined(openbsd_HOST_OS ) || defined(darwin_HOST_OS ) || \
+ defined(kfreebsdgnu_HOST_OS) )
+/* Don't use mmap on powerpc_HOST_ARCH as mmap doesn't support
* reallocating but we need to allocate jump islands just after each
* object images. Otherwise relative branches to jump islands can fail
* due to 24-bits displacement overflow.
@@ -2436,7 +2437,11 @@ static void ocFlushInstructionCacheFrom(
static void ocFlushInstructionCache( ObjectCode *oc )
{
/* The main object code */
- ocFlushInstructionCacheFrom(oc->image + oc->misalignment, oc->fileSize);
+ ocFlushInstructionCacheFrom(oc->image
+#ifdef darwin_HOST_OS
+ + oc->misalignment
+#endif
+ , oc->fileSize);
/* Jump Islands */
ocFlushInstructionCacheFrom(oc->symbol_extras, sizeof(SymbolExtra) * oc->n_symbol_extras);

View File

@ -1,18 +0,0 @@
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

@ -1,10 +1,10 @@
This patch could be replaced by a configure call if
http://hackage.haskell.org/trac/ghc/ticket/5743 were fixed.
Index: ghc-7.4.0.20111219/rts/package.conf.in
Index: ghc-7.6.1/rts/package.conf.in
===================================================================
--- ghc-7.4.0.20111219.orig/rts/package.conf.in 2011-12-21 23:21:03.000000000 +0100
+++ ghc-7.4.0.20111219/rts/package.conf.in 2011-12-21 23:21:04.000000000 +0100
--- ghc-7.6.1.orig/rts/package.conf.in 2012-09-04 19:10:15.000000000 +0200
+++ ghc-7.6.1/rts/package.conf.in 2012-10-08 13:06:55.167887121 +0200
@@ -24,8 +24,9 @@
hs-libraries: "HSrts"
@ -16,48 +16,38 @@ Index: ghc-7.4.0.20111219/rts/package.conf.in
#endif
#ifdef HAVE_LIBRT
, "rt"
Index: ghc-7.4.0.20111219/ghc.mk
Index: ghc-7.6.1/ghc.mk
===================================================================
--- ghc-7.4.0.20111219.orig/ghc.mk 2011-12-21 23:21:03.000000000 +0100
+++ ghc-7.4.0.20111219/ghc.mk 2011-12-21 23:21:04.000000000 +0100
@@ -579,7 +579,6 @@
driver/ghci \
--- ghc-7.6.1.orig/ghc.mk 2012-09-04 19:10:15.000000000 +0200
+++ ghc-7.6.1/ghc.mk 2012-10-08 13:06:55.171887120 +0200
@@ -600,7 +600,6 @@
$(MAYBE_GHCI) \
driver/ghc \
driver/haddock \
- libffi \
includes \
rts
Index: ghc-7.4.0.20111219/rts/ghc.mk
Index: ghc-7.6.1/rts/ghc.mk
===================================================================
--- ghc-7.4.0.20111219.orig/rts/ghc.mk 2011-12-21 19:56:29.000000000 +0100
+++ ghc-7.4.0.20111219/rts/ghc.mk 2011-12-21 23:23:52.000000000 +0100
@@ -86,8 +86,7 @@
ALL_RTS_DEF_LIBNAMES = base ghc-prim
ALL_RTS_DEF_LIBS = \
rts/dist/build/win32/libHSbase.dll.a \
- rts/dist/build/win32/libHSghc-prim.dll.a \
- libffi/build/inst/lib/libffi.dll.a
+ rts/dist/build/win32/libHSghc-prim.dll.a
# -- import libs for the regular Haskell libraries
define make-importlib-def # args $1 = lib name
@@ -172,12 +171,12 @@
--- ghc-7.6.1.orig/rts/ghc.mk 2012-09-04 19:10:15.000000000 +0200
+++ ghc-7.6.1/rts/ghc.mk 2012-10-08 13:08:52.019882891 +0200
@@ -177,12 +177,12 @@
# Making a shared library for the RTS.
ifneq "$$(findstring dyn, $1)" ""
ifeq "$$(HOSTPLATFORM)" "i386-unknown-mingw32"
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/libffi-5.dll
ifeq "$$(HostOS_CPP)" "mingw32"
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/$$(LIBFFI_DLL)
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
"$$(RM)" $$(RM_OPTS) $$@
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
-no-auto-link-packages -Lrts/dist/build -lffi-5 `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
-no-auto-link-packages -Lrts/dist/build -l$(LIBFFI_WINDOWS_LIB) `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
else
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext)
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
"$$(RM)" $$(RM_OPTS) $$@
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
-no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \
@@ -188,9 +187,9 @@
@@ -193,9 +193,9 @@
endif
endif
else
@ -69,12 +59,12 @@ Index: ghc-7.4.0.20111219/rts/ghc.mk
$$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
endif
@@ -504,10 +503,8 @@
@@ -509,10 +509,8 @@
# installing
INSTALL_LIBS += $(ALL_RTS_LIBS)
-INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
-INSTALL_LIBS += $(wildcard rts/dist/build/libffi-5.dll)
-INSTALL_LIBS += $(wildcard rts/dist/build/$(LIBFFI_DLL))
-install: install_libffi_headers
+install:

234
ghc.spec
View File

@ -3,46 +3,62 @@
# To bootstrap build a new version of ghc, uncomment the following:
#%%global ghc_bootstrapping 1
#%%global without_testsuite 1
### either:
#%%{?ghc_bootstrap}
#%%global without_testsuite 1
#%%global without_haddock 1
# To do a test build instead with shared libs, uncomment the following:
#%%global ghc_bootstrapping 1
### or for shared libs:
#%%{?ghc_test}
#%%global without_testsuite 1
### uncomment to generate haddocks for bootstrap
#%%undefine without_haddock
# unregisterized archs
%global unregisterised_archs ppc64 s390 s390x
# ghc does not output dwarf format so debuginfo is not useful
%global debug_package %{nil}
%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.4.2
Version: 7.6.3
# Since library subpackages are versioned:
# - 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: 11%{?dist}
# - 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: 18.3%{?dist}
Summary: Glasgow Haskell Compiler
# fedora ghc has been bootstrapped on
# %{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
License: %BSDHaskellReport
URL: http://haskell.org/ghc/
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.bz2
%endif
Source3: ghc-doc-index.cron
Source4: ghc-doc-index
URL: http://haskell.org/ghc/
# 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
# stop warnings about unsupported version of llvm
Patch14: ghc-7.6.3-LlvmCodeGen-no-3.3-warning.patch
# fix hang on ppc64 and s390x
Patch15: ghc-64bit-bigendian-rts-hang-989593.patch
# fix libffi segfaults on 32bit
Patch17: ghc-7.6.3-rts-Adjustor-32bit-segfault.patch
# fedora ghc has been bootstrapped on
# %{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
Obsoletes: ghc-dph-par < 0.5, ghc-dph-par-devel < 0.5, ghc-dph-par-prof < 0.5
Obsoletes: ghc-dph-prim-interface < 0.5, ghc-dph-prim-interface-devel < 0.5, ghc-dph-interface-prim-prof < 0.5
@ -53,7 +69,7 @@ Obsoletes: ghc-feldspar-language < 0.4, ghc-feldspar-language-devel < 0.4, ghc-f
%if %{undefined ghc_bootstrapping}
BuildRequires: ghc-compiler = %{version}
%endif
BuildRequires: ghc-rpm-macros >= 0.91
BuildRequires: ghc-rpm-macros-extra
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-directory-devel
@ -73,31 +89,12 @@ BuildRequires: python
%ifarch armv7hl armv5tel
BuildRequires: llvm >= 3.0
%endif
%ifarch armv7hl
BuildRequires: autoconf
%endif
Requires: ghc-compiler = %{version}-%{release}
%if %{undefined without_haddock}
Requires: ghc-doc-index = %{version}-%{release}
%endif
Requires: ghc-libraries = %{version}-%{release}
Requires: ghc-ghc-devel = %{version}-%{release}
# absolute haddock path (was for html/libraries -> libraries)
Patch1: ghc-6.12.1-gen_contents_index-haddock-path.patch
# type-level too big so skip it in gen_contents_index
Patch2: ghc-gen_contents_index-type-level.patch
# fedora does not allow copy libraries
Patch4: ghc-use-system-libffi.patch
Patch7: ghc-powerpc-pthread.patch
# http://hackage.haskell.org/trac/ghc/ticket/4999
Patch8: ghc-powerpc-linker-mmap.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
# latest arm hf patch
Patch11: ghc-7.4-add-support-for-ARM-hard-float-ABI-fixes-5914.patch
# disable building HS*.o libs for ghci
Patch12: ghc-7.4.2-Cabal-disable-ghci-libs.patch
Patch17: ghc-7.4-silence-gen_contents_index.patch
%description
GHC is a state-of-the-art, open source, compiler and interactive environment
@ -136,14 +133,16 @@ Requires: llvm >= 3.0
%description compiler
The package contains the GHC compiler, tools and utilities.
The ghc libraries are provided by ghc-devel.
To install all of ghc, install the ghc base package.
The ghc libraries are provided by ghc-libraries.
To install all of ghc (including the ghc library),
install the main ghc package.
%if %{undefined without_haddock}
%package doc-index
Summary: GHC library development documentation indexing
License: BSD
Requires: ghc-compiler = %{version}-%{release}
Requires: crontabs
%description doc-index
The package provides a cronjob for re-indexing installed library development
@ -161,31 +160,32 @@ documention.
%global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release}
%if %{defined ghclibdir}
%ghc_lib_subpackage Cabal 1.14.0
%ghc_lib_subpackage -l %BSDHaskellReport array 0.4.0.0
%ghc_lib_subpackage -l %BSDHaskellReport -c gmp-devel%{?_isa},libffi-devel%{?_isa} base 4.5.1.0
%ghc_lib_subpackage binary 0.5.1.0
%ghc_lib_subpackage bytestring 0.9.2.1
%ghc_lib_subpackage -l %BSDHaskellReport containers 0.4.2.1
%ghc_lib_subpackage -l %BSDHaskellReport deepseq 1.3.0.0
%ghc_lib_subpackage -l %BSDHaskellReport directory 1.1.0.2
%ghc_lib_subpackage -l %BSDHaskellReport extensible-exceptions 0.1.1.4
%ghc_lib_subpackage filepath 1.3.0.0
%ghc_lib_subpackage Cabal 1.16.0
%ghc_lib_subpackage -l %BSDHaskellReport array 0.4.0.1
%ghc_lib_subpackage -l %BSDHaskellReport -c gmp-devel%{?_isa},libffi-devel%{?_isa} base 4.6.0.1
%ghc_lib_subpackage binary 0.5.1.1
%ghc_lib_subpackage bytestring 0.10.0.2
%ghc_lib_subpackage -l %BSDHaskellReport containers 0.5.0.0
%ghc_lib_subpackage -l %BSDHaskellReport deepseq 1.3.0.1
%ghc_lib_subpackage -l %BSDHaskellReport directory 1.2.0.1
%ghc_lib_subpackage filepath 1.3.0.1
%define ghc_pkg_obsoletes ghc-bin-package-db-devel < 0.0.0.0-12
# in ghc not ghc-libraries:
%ghc_lib_subpackage -x ghc %{ghc_version_override}
%undefine ghc_pkg_obsoletes
%ghc_lib_subpackage -l HaskellReport haskell2010 1.1.0.1
%ghc_lib_subpackage -l HaskellReport haskell98 2.0.0.1
%ghc_lib_subpackage hoopl 3.8.7.3
%ghc_lib_subpackage hpc 0.5.1.1
%ghc_lib_subpackage -l %BSDHaskellReport old-locale 1.0.0.4
%ghc_lib_subpackage -l %BSDHaskellReport old-time 1.1.0.0
%ghc_lib_subpackage -l HaskellReport haskell2010 1.1.1.0
%ghc_lib_subpackage -l HaskellReport haskell98 2.0.0.2
%ghc_lib_subpackage hoopl 3.9.0.0
%ghc_lib_subpackage hpc 0.6.0.0
%ghc_lib_subpackage -l %BSDHaskellReport old-locale 1.0.0.5
%ghc_lib_subpackage -l %BSDHaskellReport old-time 1.1.0.1
%ghc_lib_subpackage pretty 1.1.1.0
%ghc_lib_subpackage -l %BSDHaskellReport process 1.1.0.1
%ghc_lib_subpackage template-haskell 2.7.0.0
%ghc_lib_subpackage time 1.4
%ghc_lib_subpackage unix 2.5.1.1
%define ghc_pkg_obsoletes ghc-process-leksah-devel < 1.0.1.4-14
%ghc_lib_subpackage -l %BSDHaskellReport process 1.1.0.2
%undefine ghc_pkg_obsoletes
%ghc_lib_subpackage template-haskell 2.8.0.0
%ghc_lib_subpackage time 1.4.0.1
%ghc_lib_subpackage unix 2.6.0.1
%endif
%global version %{ghc_version_override}
@ -206,16 +206,15 @@ Obsoletes: ghc-libs < 7.0.1-3
This is a meta-package for all the development library packages in GHC
except the ghc library, which is installed by the toplevel ghc metapackage.
%prep
%setup -q -n %{name}-%{version} %{!?without_testsuite:-b2}
# tweaks to gen_contents_index
# gen_contents_index: use absolute path for haddock
%patch1 -p1 -b .orig
%patch2 -p1
%patch17 -p1
# make sure we don't use these
rm -r ghc-tarballs/{mingw,perl}
rm -r ghc-tarballs/{mingw*,perl}
# use system libffi
%patch4 -p1 -b .libffi
rm -r ghc-tarballs/libffi
@ -228,19 +227,32 @@ ln -s $(pkg-config --variable=includedir libffi)/*.h rts/dist/build
%patch10 -p1 -b .10-ffi
%endif
# ARM patches
%ifarch armv7hl
# touches aclocal.m4
%patch11 -p1 -b .arm
autoreconf
%patch12 -p1 -b .orig
%patch13 -p1 -b .orig
%ifarch armv7hl armv5tel
%patch14 -p1 -b .orig
%endif
%patch12 -p1 -b .orig
%ifarch ppc64 s390x
%patch15 -p1 -b .orig
%endif
%patch17 -p0 -b .orig
%build
# http://hackage.haskell.org/trac/ghc/wiki/Platforms
# cf https://github.com/gentoo-haskell/gentoo-haskell/tree/master/dev-lang/ghc
cat > mk/build.mk << EOF
%if %{undefined ghc_bootstrapping}
%ifnarch armv7hl armv5tel
BuildFlavour = perf
%else
BuildFlavour = perf-llvm
%endif
%endif
GhcLibWays = v %{!?ghc_without_shared:dyn} %{!?without_prof:p}
%if %{defined without_haddock}
HADDOCK_DOCS = NO
@ -259,7 +271,9 @@ export CFLAGS="${CFLAGS:-%optflags}"
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
--with-gcc=%{_bindir}/gcc
make %{?_smp_mflags}
# utf8 is needed when building with verbose output
LANG=en_US.utf8 make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
@ -268,21 +282,19 @@ for i in %{ghc_packages_list}; do
name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")
ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")
%ghc_gen_filelists $name $ver
echo "%doc libraries/$name/LICENSE" >> ghc-$name%{?ghc_without_shared:-devel}.files
echo "%doc libraries/$name/LICENSE" >> ghc-$name.files
done
# ghc-base should own ghclibdir
echo "%dir %{ghclibdir}" >> ghc-base%{?ghc_without_shared:-devel}.files
echo "%dir %{ghclibdir}" >> ghc-base.files
%ghc_gen_filelists bin-package-db 0.0.0.0
%ghc_gen_filelists ghc %{ghc_version_override}
%ghc_gen_filelists ghc-prim 0.2.0.0
%ghc_gen_filelists integer-gmp 0.4.0.0
%ghc_gen_filelists ghc-prim 0.3.0.0
%ghc_gen_filelists integer-gmp 0.5.0.0
%define merge_filelist()\
%if %{undefined ghc_without_shared}\
cat ghc-%1.files >> ghc-%2.files\
%endif\
cat ghc-%1-devel.files >> ghc-%2-devel.files\
cp -p libraries/%1/LICENSE libraries/LICENSE.%1\
echo "%doc libraries/LICENSE.%1" >> ghc-%2.files
@ -318,6 +330,7 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ghc
install -p --mode=0755 %SOURCE4 %{buildroot}%{_bindir}/ghc-doc-index
%endif
%check
# stolen from ghc6/debian/rules:
# Do some very simple tests that the compiler actually works
@ -343,6 +356,7 @@ rm testghc/*
make test
%endif
%post compiler
# Alas, GHC, Hugs, and nhc all come with different set of tools in
# addition to a runFOO:
@ -367,6 +381,7 @@ if [ "$1" = 0 ]; then
update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc
fi
%files
%files compiler
@ -381,7 +396,7 @@ fi
%{_bindir}/hpc
%ghost %{_bindir}/hsc2hs
%{_bindir}/hsc2hs-ghc
%{_bindir}/runghc
%{_bindir}/runghc*
%ghost %{_bindir}/runhaskell
%{_bindir}/runhaskell-ghc
%{ghclibdir}/ghc
@ -417,9 +432,10 @@ fi
%dir %{ghcdocbasedir}/libraries
%{ghcdocbasedir}/libraries/frames.html
%{ghcdocbasedir}/libraries/gen_contents_index
%{ghcdocbasedir}/libraries/hscolour.css
%{ghcdocbasedir}/libraries/hslogo-16.png
%{ghcdocbasedir}/libraries/ocean.css
%{ghcdocbasedir}/libraries/prologue.txt
%{ghcdocbasedir}/libraries/synopsis.png
%{ghcdocbasedir}/index.html
%ghost %{ghcdocbasedir}/libraries/doc-index*.html
%ghost %{ghcdocbasedir}/libraries/haddock-util.js
@ -431,12 +447,64 @@ fi
%if %{undefined without_haddock}
%files doc-index
%{_sysconfdir}/cron.hourly/ghc-doc-index
%config(noreplace) %{_sysconfdir}/cron.hourly/ghc-doc-index
%endif
%files libraries
%changelog
* Wed Jan 29 2014 Jens Petersen <petersen@redhat.com> - 7.6.3-18.3
- fix segfault on i686 when using ffi double-mapping for selinux (#907515)
see http://hackage.haskell.org/trac/ghc/ticket/7629
(thanks Garrett Mitchener for patch committed upstream)
* Wed Oct 30 2013 Jens Petersen <petersen@redhat.com> - 7.6.3-18.2
- enable debuginfo for C code bits (#989593)
- back to production build
* Tue Oct 29 2013 Jens Petersen <petersen@redhat.com> - 7.6.3-18.1
- fix rts hang on 64bit bigendian archs (patch by Gustavo Luiz Duarte, #989593)
- build with utf8 encoding (needed for verbose ghc output
and makes better sense anyway)
- bootstrap build
* Sat Jul 27 2013 Jóhann B. Guðmundsson <johannbg@fedoraproject.org> - 7.6.3-18
- ghc-doc-index requires crontabs and mark cron file config noreplace
(http://fedoraproject.org/wiki/Packaging:CronFiles)
* Wed Jul 24 2013 Jens Petersen <petersen@redhat.com> - 7.6.3-17
- silence warnings about unsupported llvm version (> 3.1) on ARM
* Thu Jul 11 2013 Jens Petersen <petersen@redhat.com> - 7.6.3-16
- revert the executable stack patch since it didn't fully fix the problem
and yet changed the ghc library hash
* Wed Jul 10 2013 Jens Petersen <petersen@redhat.com> - 7.6.3-15
- turn off executable stack flag in executables (#973512)
(thanks Edward Zhang for upstream patch and Dhiru Kholia for report)
* Tue Jun 25 2013 Jens Petersen <petersen@redhat.com> - 7.6.3-14
- fix compilation with llvm-3.3 (#977652)
see http://hackage.haskell.org/trac/ghc/ticket/7996
* Thu Jun 20 2013 Jens Petersen <petersen@redhat.com> - 7.6.3-13
- production perf -O2 build
- see release notes:
http://www.haskell.org/ghc/docs/7.6.3/html/users_guide/release-7-6-1.html
http://www.haskell.org/ghc/docs/7.6.3/html/users_guide/release-7-6-2.html
http://www.haskell.org/ghc/docs/7.6.3/html/users_guide/release-7-6-3.html
* Thu Jun 20 2013 Jens Petersen <petersen@redhat.com> - 7.6.3-12
- bootstrap 7.6.3
- all library versions bumped except pretty
- ghc-7.4-add-support-for-ARM-hard-float-ABI-fixes-5914.patch, and
ghc-7.4-silence-gen_contents_index.patch are no longer needed
- build with ghc-rpm-macros-extra
- no longer filter type-level package from haddock index
- process obsoletes process-leksah
- do production build with BuildFlavour perf (#880135)
* Tue Feb 5 2013 Jens Petersen <petersen@redhat.com> - 7.4.2-11
- ghclibdir should be owned at runtime by ghc-base instead of ghc-compiler
(thanks Michael Scherer, #907671)

View File

@ -1,2 +1,2 @@
267462db5c5a7c245fb26361b77007c4 ghc-7.4.2-src.tar.bz2
528005749c761fe6c12a0079bd84fb90 ghc-7.4.2-testsuite.tar.bz2
986d1f90ca30d60f7b2820d75c6b8ea7 ghc-7.6.3-src.tar.bz2
66aa6177a31cc4b9d7eeb55cb1514918 ghc-7.6.3-testsuite.tar.bz2