Commit 3565a1b5 authored by Ian Lynagh's avatar Ian Lynagh

Define the GHC "compiler_always_flags" in make; fixes trac #5213

We now pass the "always" flags to Makefile tests as well as python tests.
parent 89fbd3c6
......@@ -7,7 +7,7 @@ import re
#
config.compiler_type = 'ghc'
config.compiler = 'ghc'
config.compiler_always_flags = ['-fforce-recomp', '-dcore-lint', '-dcmm-lint', '-dno-debug-output', '-no-user-package-conf', '-rtsopts']
config.compiler_always_flags = ghc_compiler_always_flags.split()
config.hp2ps = 'hp2ps'
config.hpc = 'hpc'
......
......@@ -27,7 +27,7 @@ CONFIG = $(CONFIGDIR)/$(COMPILER)
# TEST_HC_OPTS is passed to every invocation of TEST_HC
# in nested Makefiles
TEST_HC_OPTS = -dno-debug-output $(EXTRA_HC_OPTS)
TEST_HC_OPTS = -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-conf -rtsopts $(EXTRA_HC_OPTS)
RUNTEST_OPTS =
......@@ -41,6 +41,8 @@ else
exeext = .exe
endif
RUNTEST_OPTS += -e ghc_compiler_always_flags="'$(TEST_HC_OPTS)'"
$(eval $(call get-ghc-feature-bool,GhcWithNativeCodeGen,Have native code generator))
ifeq "$(GhcWithNativeCodeGen)" "YES"
RUNTEST_OPTS += -e ghc_with_native_codegen=1
......
......@@ -443,11 +443,11 @@ shared001:
.PHONY: rtsopts001
rtsopts001:
$(RM) rtsOpts$(exeext) rtsOpts.hi rtsOpts.o
"$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make rtsOpts -rtsopts
"$(TEST_HC)" $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 --make rtsOpts -rtsopts
echo "Normal"
-./rtsOpts +RTS -C0 2>&1
$(RM) rtsOpts$(exeext) rtsOpts.hi rtsOpts.o
"$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make rtsOpts
"$(TEST_HC)" $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 --make rtsOpts
echo "No RTS opts"
-./rtsOpts +RTS -C0 2>&1
......
......@@ -9,8 +9,8 @@ T3807:
$(RM) T3807-export.o T3807-load.o
$(RM) T3807test.so
$(RM) T3807-load
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make -dynamic -fPIC -shared T3807Export.hs T3807-export.c -o T3807test.so -lHSrts-ghc`'$(TEST_HC)' $(TEST_HC_OPTS) --numeric-version` -rtsopts
'$(TEST_HC)' $(TEST_HC_OPTS) -no-auto-link-packages -no-hs-main T3807-load.c -o T3807-load -ldl
'$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 --make -dynamic -fPIC -shared T3807Export.hs T3807-export.c -o T3807test.so -lHSrts-ghc`'$(TEST_HC)' $(TEST_HC_OPTS) --numeric-version` -rtsopts
'$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -no-auto-link-packages -no-hs-main T3807-load.c -o T3807-load -ldl
./T3807-load
.PHONY: T4464
......@@ -32,10 +32,10 @@ T4464:
.PHONY: T5373
T5373:
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -dynamic --make T5373A
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -dynamic --make T5373B -rtsopts
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -dynamic --make T5373C -rtsopts=some
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -dynamic --make T5373D -rtsopts=none
'$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 -dynamic --make T5373A
'$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 -dynamic --make T5373B -rtsopts
'$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 -dynamic --make T5373C -rtsopts=some
'$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 -dynamic --make T5373D -rtsopts=none
-./T5373A +RTS -c 2>&1 | grep disabled
-./T5373B +RTS -c 2>&1 | grep disabled
-./T5373C +RTS -c 2>&1 | grep disabled
......
......@@ -9,6 +9,6 @@ clean:
base01:
rm -f GHC/*.o
rm -f GHC/*.hi
'$(TEST_HC)' $(TEST_HC_OPTS) -XNoImplicitPrelude -package-name base -c GHC/Base.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -XNoImplicitPrelude -package-name base --make GHC.Foo
'$(TEST_HC)' $(filter-out -fforce-recomp,$(TEST_HC_OPTS)) -XNoImplicitPrelude -package-name base -c GHC/Base.hs
'$(TEST_HC)' $(filter-out -fforce-recomp,$(TEST_HC_OPTS)) -XNoImplicitPrelude -package-name base --make GHC.Foo
......@@ -20,7 +20,7 @@ T2412:
tc245:
$(RM) -f Tc245_A.hi Tc245_A.o tc245.hi tc245.o
'$(TEST_HC)' $(TEST_HC_OPTS) --make tc245
'$(TEST_HC)' $(filter-out -fforce-recomp,$(TEST_HC_OPTS)) --make tc245
$(RM) -f tc245.hi tc245.o
'$(TEST_HC)' $(TEST_HC_OPTS) --make tc245
'$(TEST_HC)' $(filter-out -fforce-recomp,$(TEST_HC_OPTS)) --make tc245
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