ghc-prim: Emulate C11 atomics when not available
GCC's __sync primitives apparently "usually" imply a full barrier, meaning they can be used to emulate the more precise C11 atomics albeit with a loss of efficiency. This restores compatibility with GCC 4.4. This partially reverts commit 59de2909. Test Plan: Validate on Centos Reviewers: hvr, simonmar, trommler Subscribers: rwbarton, thomie, erikd, carter GHC Trac Issues: #14244 Differential Revision: https://phabricator.haskell.org/D4364 (cherry picked from commit 217e4170)
Showing
- aclocal.m4 23 additions, 2 deletionsaclocal.m4
- configure.ac 5 additions, 0 deletionsconfigure.ac
- libraries/ghc-prim/cbits/atomic.c 36 additions, 0 deletionslibraries/ghc-prim/cbits/atomic.c
- mk/config.mk.in 1 addition, 0 deletionsmk/config.mk.in
- mk/warnings.mk 3 additions, 1 deletionmk/warnings.mk
- rts/ghc.mk 2 additions, 0 deletionsrts/ghc.mk
Please register or sign in to comment