summaryrefslogtreecommitdiff
path: root/rts/ghc.mk
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2018-02-03 11:37:01 -0500
committerBen Gamari <ben@smart-cactus.org>2018-02-03 11:37:14 -0500
commit217e4170bdce3df28a667803ce5e619553bfecdd (patch)
tree1e548bae29aecc72ce257dc962025c1388a7a7b5 /rts/ghc.mk
parentfdf518c708dc5a34ae810c5d5f3a4db812d226f0 (diff)
downloadhaskell-217e4170bdce3df28a667803ce5e619553bfecdd.tar.gz
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 59de290928e6903337f31c1f8107ac8a98ea145d. 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
Diffstat (limited to 'rts/ghc.mk')
-rw-r--r--rts/ghc.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 690a883588..761cc43b8f 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -311,7 +311,9 @@ WARNING_OPTS += -Wpointer-arith
WARNING_OPTS += -Wmissing-noreturn
WARNING_OPTS += -Wnested-externs
WARNING_OPTS += -Wredundant-decls
+ifeq "$(GccLT46)" "NO"
WARNING_OPTS += -Wundef
+endif
# These ones are hard to avoid:
#WARNING_OPTS += -Wconversion