#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): Phab:D1399 Wiki Page: | ----------------------------------------+---------------------------------- Comment (by Erik de Castro Lopo <erikd@…>): In [changeset:"8ddf41744ea8b0c1d034f9c5e062b0112d3d3aff/ghc" 8ddf4174/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="8ddf41744ea8b0c1d034f9c5e062b0112d3d3aff" Linker: Fix type in m32_free_internal The code: uint64_t c = __sync_sub_and_fetch((uint64_t*)addr, 1); was causing GCC to emit atomic instructions for 64 bit values which are not available on PowerPC. However, since PowerPC only has a 32 bit address space, use of a 64 bit value is superflous. Switching the type from `uint64_t` to `uintptr_t` should simply do the correct thing on all 32 and 64 bit architectures. Reviewers: austin, bgamari, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1399 GHC Trac Issues: #11036 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11036#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler