diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2011-04-04 22:40:15 +1000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-04-12 16:46:09 +0100 |
commit | 243c304273a1254418aeacf4d81cadb2d59945ad (patch) | |
tree | fee71bd1c09a20a1b99a4b589e197172c9c05d31 /rts/Linker.c | |
parent | a52ff7619e8b7d74a9d933d922eeea49f580bca8 (diff) | |
download | haskell-243c304273a1254418aeacf4d81cadb2d59945ad.tar.gz |
Fix compiling on linux-powerpc.
Diffstat (limited to 'rts/Linker.c')
-rw-r--r-- | rts/Linker.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/rts/Linker.c b/rts/Linker.c index 5285ec6d55..c840857490 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -70,12 +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) ) || \ - defined(kfreebsdgnu_HOST_OS) -/* 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. @@ -2572,7 +2572,11 @@ 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); |