reinstate and refresh Cabal-fix-dynamic-exec-for-TH.patch

This commit is contained in:
Jens Petersen 2013-06-12 11:43:49 +09:00
parent 2b100fabe7
commit 025408ab14
2 changed files with 29 additions and 2 deletions

View File

@ -0,0 +1,23 @@
--- 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 @@
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 &&
+ when ((withProfExe lbi || withDynExe lbi) &&
EnableExtension TemplateHaskell `elem` allExtensions exeBi) $
- runGhcProg exeProfOpts { ghcOptNoLink = toFlag True }
+ runGhcProg staticOpts { ghcOptNoLink = toFlag True }
runGhcProg exeOpts { ghcOptOutputFile = toFlag (targetDir </> exeNameReal) }

View File

@ -41,9 +41,11 @@ Source2: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-testsuite.tar
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
Patch1: ghc-gen_contents_index-haddock-path.patch
# fedora does not allow copy libraries
Patch4: ghc-use-system-libffi.patch
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
@ -213,6 +215,8 @@ 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
%endif