Ticket #8366: 0001-Added-USE_MMAP-for-Solaris2-fixes-GHCi-segfault.patch

File 0001-Added-USE_MMAP-for-Solaris2-fixes-GHCi-segfault.patch, 1.0 KB (added by oddsignals, 7 months ago)
  • rts/Linker.c

    From 60620f3fb2fb73764dcaaffa36fdc570cba7ae21 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Kjetil=20Limkj=C3=A6r?= <kjetil@lostcontinent.mu>
    Date: Sat, 5 Oct 2013 23:52:46 +0000
    Subject: [PATCH] Added USE_MMAP for Solaris2, fixes GHCi segfault
    
    ---
     rts/Linker.c | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/rts/Linker.c b/rts/Linker.c
    index f2672d7..0913087 100644
    a b  
    7777    (   defined(linux_HOST_OS)     || defined(freebsd_HOST_OS) || \ 
    7878        defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS ) || \ 
    7979        defined(openbsd_HOST_OS  ) || defined(darwin_HOST_OS ) || \ 
    80         defined(kfreebsdgnu_HOST_OS) || defined(gnu_HOST_OS))) 
     80        defined(kfreebsdgnu_HOST_OS) || defined(gnu_HOST_OS)   || \ 
     81        defined(solaris2_HOST_OS))) 
    8182/* Don't use mmap on powerpc_HOST_ARCH as mmap doesn't support 
    8283 * reallocating but we need to allocate jump islands just after each 
    8384 * object images. Otherwise relative branches to jump islands can fail