[ghc/f17] patch ghc wrapper script to add libffi includedir on tier 2 archs

Jens Petersen petersen at fedoraproject.org
Thu Mar 8 09:35:13 UTC 2012


commit 7d29e3748f61712faec07f92114b668f5de6a84f
Author: Jens Petersen <petersen at redhat.com>
Date:   Thu Mar 8 18:35:06 2012 +0900

    patch ghc wrapper script to add libffi includedir on tier 2 archs

 ghc-wrapper-libffi-include.patch |    8 ++++++++
 ghc.spec                         |   11 ++++++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/ghc-wrapper-libffi-include.patch b/ghc-wrapper-libffi-include.patch
new file mode 100644
index 0000000..b8963e7
--- /dev/null
+++ b/ghc-wrapper-libffi-include.patch
@@ -0,0 +1,8 @@
+diff -u ghc-7.0.4/ghc/ghc.wrapper\~ ghc-7.0.4/ghc/ghc.wrapper
+--- ghc-7.0.4/ghc/ghc.wrapper~	2011-06-14 02:10:05.000000000 +0900
++++ ghc-7.0.4/ghc/ghc.wrapper	2012-03-08 18:00:02.713144402 +0900
+@@ -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" -optc-I$(pkg-config --variable=includedir libffi) ${1+"$@"}
+
+Diff finished.  Thu Mar  8 18:01:14 2012
diff --git a/ghc.spec b/ghc.spec
index 7908d06..cca1d01 100644
--- a/ghc.spec
+++ b/ghc.spec
@@ -30,7 +30,7 @@ Version: 7.0.4
 # - 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: 44%{?dist}
+Release: 45%{?dist}
 Summary: Glasgow Haskell Compiler
 # fedora ghc has been bootstrapped on the following archs:
 #ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9 ppc64 armv7hl armv5tel
@@ -86,6 +86,8 @@ Patch7: ghc-ppc64-pthread.patch
 Patch8: ghc-powerpc-linker-mmap.patch
 # touches configure.ac
 Patch9: ghc-7.0.4-configure-s390x
+# add libffi include dir to ghc wrapper for archs using gcc
+Patch10: ghc-wrapper-libffi-include.patch
 
 %description
 GHC is a state-of-the-art, open source, compiler and interactive environment
@@ -217,6 +219,10 @@ ln -s $(pkg-config --variable=includedir libffi)/*.h libraries/base/include
 %patch9 -p1 -b .s390x
 %endif
 
+%ifnarch %{ix86} x86_64
+%patch10 -p1 -b .10-ffi
+%endif
+
 %build
 # http://hackage.haskell.org/trac/ghc/wiki/Platforms
 # cf https://github.com/gentoo-haskell/gentoo-haskell/tree/master/dev-lang/ghc
@@ -428,6 +434,9 @@ fi
 %files libraries
 
 %changelog
+* Thu Mar  8 2012 Jens Petersen <petersen at redhat.com> - 7.0.4-45
+- patch ghc wrapper script to add libffi includedir on tier 2 archs
+
 * Sat Mar  3 2012 Jens Petersen <petersen at redhat.com> - 7.0.4-44
 - BR ghc-compiler
 - add s390 and s390x to unregisterised_archs


More information about the scm-commits mailing list