You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.6 KiB
35 lines
1.6 KiB
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);
|