
#11036: powerpc/linux: undefined reference to `__sync_sub_and_fetch_8 ----------------------------------------+------------------------------- Reporter: erikd | Owner: erikd Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+------------------------------- Changes (by erikd): * owner: => erikd Comment: Looks like the following fix will work. {{{ diff --git a/rts/Linker.c b/rts/Linker.c index 98969b9..e7bb8f0 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -1217,7 +1217,7 @@ static void m32_allocator_init(m32_allocator m32) { * You shouldn't have to use this method. Use `m32_free` instead. */ static void m32_free_internal(void * addr) { - uint64_t c = __sync_sub_and_fetch((uint64_t*)addr, 1); + uintptr_t c = __sync_sub_and_fetch((uintptr_t*)addr, 1); if (c == 0) { munmapForLinker(addr, getPageSize()); } }}} Need to test on powerpc, x86_64 and arm at least. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11036#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler