add upstream ghc-powerpc-linker-mmap.patch for ppc64 (Jiri Skala)

This commit is contained in:
Jens Petersen 2011-04-26 17:40:21 +09:00
parent f103ae83ed
commit 98a946c2f0
2 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,34 @@
diff -up ghc-7.0.2/rts/Linker.c.fix-powerpc ghc-7.0.2/rts/Linker.c
--- ghc-7.0.2/rts/Linker.c.fix-powerpc 2011-02-28 19:10:08.000000000 +0100
+++ ghc-7.0.2/rts/Linker.c 2011-04-25 22:20:10.781092305 +0200
@@ -70,11 +70,12 @@
#include <sys/wait.h>
#endif
-#if defined(linux_HOST_OS ) || defined(freebsd_HOST_OS) || \
- defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS ) || \
- defined(openbsd_HOST_OS ) || \
- ( defined(darwin_HOST_OS ) && !defined(powerpc_HOST_ARCH) )
-/* Don't use mmap on powerpc-apple-darwin as mmap doesn't support
+#if !defined(powerpc_HOST_ARCH) && \
+ ( defined(linux_HOST_OS ) || defined(freebsd_HOST_OS) || \
+ defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS ) || \
+ defined(openbsd_HOST_OS ) || defined(darwin_HOST_OS ) || \
+ defined(kfreebsdgnu_HOST_OS) )
+/* Don't use mmap on powerpc_HOST_ARCH as mmap doesn't support
* reallocating but we need to allocate jump islands just after each
* object images. Otherwise relative branches to jump islands can fail
* due to 24-bits displacement overflow.
@@ -2436,7 +2437,11 @@ static void ocFlushInstructionCacheFrom(
static void ocFlushInstructionCache( ObjectCode *oc )
{
/* The main object code */
- ocFlushInstructionCacheFrom(oc->image + oc->misalignment, oc->fileSize);
+ ocFlushInstructionCacheFrom(oc->image
+#ifdef darwin_HOST_OS
+ + oc->misalignment
+#endif
+ , oc->fileSize);
/* Jump Islands */
ocFlushInstructionCacheFrom(oc->symbol_extras, sizeof(SymbolExtra) * oc->n_symbol_extras);

View File

@ -47,7 +47,7 @@ Version: 7.0.2
# - 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: 18%{?dist}
Release: 19%{?dist}
Summary: Glasgow Haskell Compilation system
# fedora ghc has only been bootstrapped on the following archs:
ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9 ppc64
@ -94,6 +94,8 @@ Patch4: ghc-use-system-libffi.patch
Patch5: Cabal-option-executable-dynamic.patch
Patch6: ghc-fix-linking-on-sparc.patch
Patch7: ghc-ppc64-pthread.patch
# http://hackage.haskell.org/trac/ghc/ticket/4999
Patch8: ghc-powerpc-linker-mmap.patch
%description
GHC is a state-of-the-art programming suite for Haskell, a purely
@ -178,6 +180,7 @@ rm -r ghc-tarballs/libffi
%ifarch ppc64
%patch7 -p1 -b .pthread
%patch8 -p1 -b .mmap
%endif
@ -397,6 +400,9 @@ fi
%endif
%changelog
* Tue Apr 26 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-19
- upstream ghc-powerpc-linker-mmap.patch for ppc64 (Jiri Skala)
* Thu Apr 21 2011 Jiri Skala <jskala@redhat.com> - 7.0.2-18
- bootstrap to ppc64