[ghc] reinstate and refresh Cabal-fix-dynamic-exec-for-TH.patch
Jens Petersen
petersen at fedoraproject.org
Wed Jun 12 02:44:46 UTC 2013
commit 025408ab14e94b2260536672e8adf335021d5164
Author: Jens Petersen <petersen at redhat.com>
Date: Wed Jun 12 11:43:49 2013 +0900
reinstate and refresh Cabal-fix-dynamic-exec-for-TH.patch
Cabal-fix-dynamic-exec-for-TH.patch | 23 +++++++++++++++++++++++
ghc.spec | 8 ++++++--
2 files changed, 29 insertions(+), 2 deletions(-)
---
diff --git a/Cabal-fix-dynamic-exec-for-TH.patch b/Cabal-fix-dynamic-exec-for-TH.patch
new file mode 100644
index 0000000..382b343
--- /dev/null
+++ b/Cabal-fix-dynamic-exec-for-TH.patch
@@ -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) }
+
diff --git a/ghc.spec b/ghc.spec
index 6ba7171..33159df 100644
--- a/ghc.spec
+++ b/ghc.spec
@@ -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
More information about the scm-commits
mailing list