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

epel9
Jens Petersen 12 years ago
parent 6643079e5d
commit 1f0e92321d

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

@ -44,6 +44,8 @@ Source4: ghc-doc-index
Patch1: ghc-gen_contents_index-haddock-path.patch Patch1: ghc-gen_contents_index-haddock-path.patch
# fedora does not allow copy libraries # 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 # 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 # disable building HS*.o libs for ghci
@ -213,6 +215,8 @@ rm -r ghc-tarballs/libffi
mkdir -p rts/dist/build mkdir -p rts/dist/build
ln -s $(pkg-config --variable=includedir libffi)/*.h rts/dist/build ln -s $(pkg-config --variable=includedir libffi)/*.h rts/dist/build
%patch9 -p1 -b .orig
%ifnarch %{ix86} x86_64 %ifnarch %{ix86} x86_64
%patch10 -p1 -b .10-ffi %patch10 -p1 -b .10-ffi
%endif %endif

Loading…
Cancel
Save