[commit: ghc] master: testsuite: disable gcc's warnings about casts of incompatible prototypes in UNREG (fcdd58d)
git at git.haskell.org
git at git.haskell.org
Sat Aug 23 08:59:55 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/fcdd58d2ddcfd8d420adbcb3f20c1d666bc834e6/ghc
>---------------------------------------------------------------
commit fcdd58d2ddcfd8d420adbcb3f20c1d666bc834e6
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date: Sat Aug 23 11:01:16 2014 +0300
testsuite: disable gcc's warnings about casts of incompatible prototypes in UNREG
Haskell's 'foreign import' declaraion does not have a way
to extress exact C prototypes (it ignores 'const' modifiers, exact pointer
types, etc.) which leads to warnings when C backend generates calls to such
functions:
/tmp/ghc32698_0/ghc32698_10.hc:52:5:
warning: conflicting types for built-in function ‘strlen’ [enabled by default]
EF_(strlen);
^
Patch disables builtin functions for UNREG build
to workaround test failures due to stderr mismatch.
Fixes the following test failures:
TEST="safePkg01 T5423 T7574 T3736"
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
>---------------------------------------------------------------
fcdd58d2ddcfd8d420adbcb3f20c1d666bc834e6
testsuite/mk/test.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index d6e550f..2ff8616 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -25,6 +25,13 @@ COMPILER = ghc
CONFIGDIR = $(TOP)/config
CONFIG = $(CONFIGDIR)/$(COMPILER)
+ifeq "$(GhcUnregisterised)" "YES"
+ # Otherwise C backend generates many warnings about
+ # imcompatible proto casts for GCC's buitins:
+ # memcpy, printf, strlen.
+ EXTRA_HC_OPTS += -optc-fno-builtin
+endif
+
# TEST_HC_OPTS is passed to every invocation of TEST_HC
# in nested Makefiles
TEST_HC_OPTS = -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-$(GhcPackageDbFlag) -rtsopts $(EXTRA_HC_OPTS)
More information about the ghc-commits
mailing list