Skip to content
  • Joachim Breitner's avatar
    Link pre-ARMv6 spinlocks into all RTS variants · df1307f0
    Joachim Breitner authored
    Summary:
    For compatibility with ARM machines from pre v6, the RTS provides
    implementations of certain atomic operations. Previously, these
    were only included in the threaded RTS.
    
    But ghc (the library) contains the code in compiler/cbits/genSym.c, which
    uses these operations if there is more than one capability. But there is only
    one libHSghc, so the linker wants to resolve these symbols in every case.
    
    By providing these operations in all RTSs, the linker is happy. The only
    downside is a small amount of dead code in the non-threaded RTS on old ARM
    machines.
    
    Test Plan: It helped here.
    
    Reviewers: bgamari, austin
    
    Reviewed By: bgamari, austin
    
    Subscribers: carter, thomie
    
    Differential Revision: https://phabricator.haskell.org/D564
    
    GHC Trac Issues: #8951
    df1307f0