summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-11-17 18:04:41 +0000
committerIan Lynagh <igloo@earth.li>2011-11-17 18:04:41 +0000
commit3565a1b517fefe07572654f9d05558a9f7a1a9ba (patch)
tree9f6b12076fafd589097633d847b46565b33fcdc4
parent89fbd3c64392abc255ffd48ed98d2fd1f7443dc1 (diff)
downloadhaskell-3565a1b517fefe07572654f9d05558a9f7a1a9ba.tar.gz
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.
-rw-r--r--testsuite/config/ghc2
-rw-r--r--testsuite/mk/test.mk4
-rw-r--r--testsuite/tests/driver/Makefile4
-rw-r--r--testsuite/tests/dynlibs/Makefile12
-rw-r--r--testsuite/tests/module/base01/Makefile4
-rw-r--r--testsuite/tests/typecheck/should_compile/Makefile4
6 files changed, 16 insertions, 14 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index 36f74e4935..671c8a8ae3 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -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'
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index 95b29c53da..c8db53d592 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -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
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile
index 472daa6716..c13665b99d 100644
--- a/testsuite/tests/driver/Makefile
+++ b/testsuite/tests/driver/Makefile
@@ -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
diff --git a/testsuite/tests/dynlibs/Makefile b/testsuite/tests/dynlibs/Makefile
index 35e5788e0f..6d4f736983 100644
--- a/testsuite/tests/dynlibs/Makefile
+++ b/testsuite/tests/dynlibs/Makefile
@@ -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
diff --git a/testsuite/tests/module/base01/Makefile b/testsuite/tests/module/base01/Makefile
index f88e8a3e4d..815fbff1d4 100644
--- a/testsuite/tests/module/base01/Makefile
+++ b/testsuite/tests/module/base01/Makefile
@@ -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
diff --git a/testsuite/tests/typecheck/should_compile/Makefile b/testsuite/tests/typecheck/should_compile/Makefile
index 75691da79c..9ca0b63590 100644
--- a/testsuite/tests/typecheck/should_compile/Makefile
+++ b/testsuite/tests/typecheck/should_compile/Makefile
@@ -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