summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/ghci/Linker.hs2
-rw-r--r--testsuite/driver/testlib.py1
-rw-r--r--testsuite/tests/th/Makefile6
-rw-r--r--testsuite/tests/th/all.T2
4 files changed, 8 insertions, 3 deletions
diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs
index a95120d906..7e86e1135f 100644
--- a/compiler/ghci/Linker.hs
+++ b/compiler/ghci/Linker.hs
@@ -683,7 +683,7 @@ getLinkDeps hsc_env hpt pls replace_osuf span mods
adjust_ul new_osuf (DotO file) = do
MASSERT(osuf `isSuffixOf` file)
- let file_base = dropTail (length osuf + 1) file
+ let file_base = fromJust (stripExtension osuf file)
new_file = file_base <.> new_osuf
ok <- doesFileExist new_file
if (not ok)
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 44eebd62c6..cf5a226bc6 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -125,6 +125,7 @@ def req_haddock( name, opts ):
opts.expect = 'missing-lib'
def req_profiling( name, opts ):
+ '''Require the profiling libraries (add 'GhcLibWays += p' to mk/build.mk)'''
if not config.have_profiling:
opts.expect = 'fail'
diff --git a/testsuite/tests/th/Makefile b/testsuite/tests/th/Makefile
index b759a81b67..4fb508f394 100644
--- a/testsuite/tests/th/Makefile
+++ b/testsuite/tests/th/Makefile
@@ -15,9 +15,11 @@ T7445:
HC_OPTS = -XTemplateHaskell -package template-haskell
TH_spliceE5_prof::
- $(RM) TH_spliceE5_prof*.o TH_spliceE5_prof*.hi TH_spliceE5_prof*.p.o
+ $(RM) TH_spliceE5_prof*.o TH_spliceE5_prof*.hi TH_spliceE5_prof*.dyn_o TH_spliceE5_prof*.dyn_hi TH_spliceE5_prof
'$(TEST_HC)' $(TEST_HC_OPTS) $(HC_OPTS) $(ghcThWayFlags) --make -v0 TH_spliceE5_prof.hs -c
- '$(TEST_HC)' $(TEST_HC_OPTS) $(HC_OPTS) --make -v0 TH_spliceE5_prof.hs -prof -auto-all -osuf p.o -o $@
+ # Using `-osuf .p.o` should work. Note the dot before the `p` (#9760), and
+ # the dot between the `p` and the `o` (#5554).
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(HC_OPTS) --make -v0 TH_spliceE5_prof.hs -prof -auto-all -osuf .p.o -o $@
./$@
# With -fexternal-interpreter, we don't have to build the non-profiled
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index 9d00d8e856..fb429bcbd5 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -47,6 +47,8 @@ test('TH_spliceE5_prof',
[req_profiling,
omit_ways(['ghci']),
extra_clean(['TH_spliceE5_prof_Lib.p.o', 'TH_spliceE5_prof_Lib.hi',
+ 'TH_spliceE5_prof_Lib.dyn_o', 'TH_spliceE5_prof_Lib.dyn_hi',
+ 'TH_spliceE5_prof.dyn_o', 'TH_spliceE5_prof.dyn_hi',
'TH_spliceE5_prof_Lib.o','TH_spliceE5_prof.p.o'])],
run_command,
['$MAKE -s --no-print-directory TH_spliceE5_prof'])