[commit: ghc] ghc-7.8: testsuite: disable gcc's warnings about casts of incompatible prototypes in UNREG (60d88fa)
git at git.haskell.org
git at git.haskell.org
Mon Nov 3 13:25:25 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.8
Link : http://ghc.haskell.org/trac/ghc/changeset/60d88fabac11c4e2572692dc73d6842647cb59a7/ghc
>---------------------------------------------------------------
commit 60d88fabac11c4e2572692dc73d6842647cb59a7
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>
(cherry picked from commit fcdd58d2ddcfd8d420adbcb3f20c1d666bc834e6)
>---------------------------------------------------------------
60d88fabac11c4e2572692dc73d6842647cb59a7
testsuite/mk/test.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index 0cc3f21..ab059bf 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