Commit fcdd58d2 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

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: default avatarSergei Trofimovich <slyfox@gentoo.org>
parent ff9f4ad3
...@@ -25,6 +25,13 @@ COMPILER = ghc ...@@ -25,6 +25,13 @@ COMPILER = ghc
CONFIGDIR = $(TOP)/config CONFIGDIR = $(TOP)/config
CONFIG = $(CONFIGDIR)/$(COMPILER) 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 # TEST_HC_OPTS is passed to every invocation of TEST_HC
# in nested Makefiles # in nested Makefiles
TEST_HC_OPTS = -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-$(GhcPackageDbFlag) -rtsopts $(EXTRA_HC_OPTS) TEST_HC_OPTS = -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-$(GhcPackageDbFlag) -rtsopts $(EXTRA_HC_OPTS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment