[commit: ghc] wip/nfs-locking: Add -Wno-sync-nand to ghcPrim's cbits/atomic.c (6e73b4d)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 01:17:35 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/6e73b4d370755518491bdd82f5542b04d2eedf66/ghc
>---------------------------------------------------------------
commit 6e73b4d370755518491bdd82f5542b04d2eedf66
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Mon Feb 6 02:21:05 2017 +0100
Add -Wno-sync-nand to ghcPrim's cbits/atomic.c
See GHC ticket #9678
>---------------------------------------------------------------
6e73b4d370755518491bdd82f5542b04d2eedf66
cfg/system.config.in | 1 +
src/Oracles/Config/Flag.hs | 2 ++
src/Settings/Packages/GhcPrim.hs | 9 +++++++--
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/cfg/system.config.in b/cfg/system.config.in
index 9ea0f44..667a22d 100644
--- a/cfg/system.config.in
+++ b/cfg/system.config.in
@@ -30,6 +30,7 @@ ar-supports-at-file = @ArSupportsAtFile@
cc-clang-backend = @CC_CLANG_BACKEND@
cc-llvm-backend = @CC_LLVM_BACKEND@
gcc-is-clang = @GccIsClang@
+gcc-lt-44 = @GccLT44@
gcc-lt-46 = @GccLT46@
hs-cpp-args = @HaskellCPPArgs@
diff --git a/src/Oracles/Config/Flag.hs b/src/Oracles/Config/Flag.hs
index 6c5879d..8ac753f 100644
--- a/src/Oracles/Config/Flag.hs
+++ b/src/Oracles/Config/Flag.hs
@@ -12,6 +12,7 @@ import Oracles.Config.Setting
data Flag = ArSupportsAtFile
| CrossCompiling
| GccIsClang
+ | GccLt44
| GccLt46
| GhcUnregisterised
| LeadingUnderscore
@@ -29,6 +30,7 @@ flag f = do
ArSupportsAtFile -> "ar-supports-at-file"
CrossCompiling -> "cross-compiling"
GccIsClang -> "gcc-is-clang"
+ GccLt44 -> "gcc-lt-44"
GccLt46 -> "gcc-lt-46"
GhcUnregisterised -> "ghc-unregisterised"
LeadingUnderscore -> "leading-underscore"
diff --git a/src/Settings/Packages/GhcPrim.hs b/src/Settings/Packages/GhcPrim.hs
index 225ff56..bed8345 100644
--- a/src/Settings/Packages/GhcPrim.hs
+++ b/src/Settings/Packages/GhcPrim.hs
@@ -1,8 +1,13 @@
module Settings.Packages.GhcPrim (ghcPrimPackageArgs) where
import GHC
+import Oracles.Config.Flag
import Predicate
ghcPrimPackageArgs :: Args
-ghcPrimPackageArgs = package ghcPrim ?
- builder GhcCabal ? arg "--flag=include-ghc-prim"
+ghcPrimPackageArgs = package ghcPrim ? mconcat
+ [ builder GhcCabal ? arg "--flag=include-ghc-prim"
+
+ , builder (Cc CompileC) ?
+ (not <$> flag GccLt44) ?
+ input "//cbits/atomic.c" ? arg "-Wno-sync-nand" ]
More information about the ghc-commits
mailing list