ghc-wrapper-libffi-include.patch for "missing libffi.h" when compiling prof on secondary archs

eg on armv7:

[ 1 of 21] Compiling Data.Functor.Product ( Data/Functor/Product.hs, dist/build/Data/Functor/Product.p_o )

/tmp/ghc1692_0/ghc1692_0.c:4:17:
     fatal error: ffi.h: No such file or directory
This commit is contained in:
Jens Petersen 2012-05-02 19:54:30 +09:00
parent 8dcd7bb8c1
commit df25dd92de
2 changed files with 24 additions and 8 deletions

View File

@ -0,0 +1,6 @@
diff -u ghc-7.4.1/ghc/ghc.wrapper\~ ghc-7.4.1/ghc/ghc.wrapper
--- ghc-7.4.1/ghc/ghc.wrapper~ 2012-02-02 03:10:32.000000000 +0900
+++ ghc-7.4.1/ghc/ghc.wrapper 2012-05-02 19:39:05.503872527 +0900
@@ -1 +1 @@
-exec "$executablename" -B"$topdir" ${1+"$@"}
+exec "$executablename" -B"$topdir" -optc-I$(pkg-config --variable=includedir libffi) ${1+"$@"}

View File

@ -30,7 +30,7 @@ Version: 7.4.1
# - 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: 3%{?dist}
Release: 4%{?dist}
Summary: Glasgow Haskell Compiler
# fedora ghc has been bootstrapped on
# %{ix86} x86_64 ppc alpha sparcv9 ppc64 armv7hl armv5tel s390 s390x
@ -98,12 +98,14 @@ Patch7: ghc-powerpc-pthread.patch
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
# Debian armel fixes
Patch10: fix-ARM-s-StgCRun-clobbered-register-list-for-both-A.patch
Patch11: fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis.patch
Patch11: fix-ARM-s-StgCRun-clobbered-register-list-for-both-A.patch
Patch12: fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis.patch
# Debian armhf fixes
Patch12: ghc-debian-ARM-VFPv3D16.patch
Patch13: ghc-debian-armhf_llvm_abi.patch
Patch13: ghc-debian-ARM-VFPv3D16.patch
Patch14: ghc-debian-armhf_llvm_abi.patch
%description
GHC is a state-of-the-art, open source, compiler and interactive environment
@ -218,15 +220,19 @@ 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
# ARM patches
%ifarch armv7hl armv5tel
%patch10 -p1 -b .arm1
%patch11 -p1 -b .arm2
%patch11 -p1 -b .arm1
%patch12 -p1 -b .arm2
%endif
%ifarch armv7hl
# touches aclocal.m4
%patch12 -p1 -b .arm
%patch13 -p1 -b .arm
%patch14 -p1 -b .arm
autoreconf
%endif
@ -430,6 +436,10 @@ fi
%files libraries
%changelog
* Wed May 2 2012 Jens Petersen <petersen@redhat.com> - 7.4.1-4
- add ghc-wrapper-libffi-include.patch to workaround "missing libffi.h"
for prof compiling on secondary archs
* Sat Apr 28 2012 Jens Petersen <petersen@redhat.com> - 7.4.1-3
- build with llvm-3.0 on ARM
- remove ARM from unregisterised_archs