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

         warning: conflicting types for built-in function ‘strlen’ [enabled by default]

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 <>
parent ff9f4ad3
......@@ -25,6 +25,13 @@ COMPILER = ghc
CONFIGDIR = $(TOP)/config
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
# 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)
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