summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2014-08-23 11:01:16 +0300
committerAustin Seipp <austin@well-typed.com>2014-11-03 07:24:58 -0600
commit60d88fabac11c4e2572692dc73d6842647cb59a7 (patch)
treedffb8ed93eb0736c773b20eb2b8d28f4f7323e08
parenta674a0d874c45785af6a7a66fde402008b2504fc (diff)
downloadhaskell-60d88fabac11c4e2572692dc73d6842647cb59a7.tar.gz
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@gentoo.org> (cherry picked from commit fcdd58d2ddcfd8d420adbcb3f20c1d666bc834e6)
-rw-r--r--testsuite/mk/test.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index 0cc3f21c8a..ab059bf716 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)