[commit: ghc] master: Suppress the warning about __sync_fetch_and_nand (#9678) (4f5b335)
git at git.haskell.org
git at git.haskell.org
Tue May 24 07:01:23 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/4f5b33529b9e13b49a3ee00e9116b0edc9df1234/ghc
>---------------------------------------------------------------
commit 4f5b33529b9e13b49a3ee00e9116b0edc9df1234
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date: Tue May 24 00:35:33 2016 +0200
Suppress the warning about __sync_fetch_and_nand (#9678)
>---------------------------------------------------------------
4f5b33529b9e13b49a3ee00e9116b0edc9df1234
aclocal.m4 | 3 +++
mk/config.mk.in | 1 +
mk/warnings.mk | 5 +++++
3 files changed, 9 insertions(+)
diff --git a/aclocal.m4 b/aclocal.m4
index 1c9c49f..dcc3448 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1252,6 +1252,7 @@ then
AC_MSG_ERROR([gcc is required])
fi
GccLT34=NO
+GccLT44=NO
GccLT46=NO
AC_CACHE_CHECK([version of gcc], [fp_cv_gcc_version],
[
@@ -1262,10 +1263,12 @@ AC_CACHE_CHECK([version of gcc], [fp_cv_gcc_version],
# isn't a very good reason for that, but for now just make configure
# fail.
FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-lt], [3.4], GccLT34=YES)
+ FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-lt], [4.4], GccLT44=YES)
FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-lt], [4.6], GccLT46=YES)
])
AC_SUBST([GccVersion], [$fp_cv_gcc_version])
AC_SUBST(GccLT34)
+AC_SUBST(GccLT44)
AC_SUBST(GccLT46)
])# FP_GCC_VERSION
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 6d97463..5dbde02 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -525,6 +525,7 @@ endif
# the necessary format to pass to libffi's configure.
TargetPlatformFull = @TargetPlatformFull@
GccLT34 = @GccLT34@
+GccLT44 = @GccLT44@
GccLT46 = @GccLT46@
GccIsClang = @GccIsClang@
diff --git a/mk/warnings.mk b/mk/warnings.mk
index b1e4bbd..61d60ab 100644
--- a/mk/warnings.mk
+++ b/mk/warnings.mk
@@ -25,6 +25,11 @@ endif
SRC_CC_WARNING_OPTS += -Wno-error=inline
endif
+ifeq "$(GccLT44)" "NO"
+# Suppress the warning about __sync_fetch_and_nand (#9678).
+libraries/ghc-prim/cbits/atomic_CC_OPTS += -Wno-sync-nand
+endif
+
else
# Don't warn about unknown GCC pragmas when using clang
More information about the ghc-commits
mailing list