[commit: ghc] ghc-7.8: Fix compilation of cmm files with -outputdir (Trac #9050) (2f5a760)
git at git.haskell.org
git at git.haskell.org
Mon Jun 9 12:06:39 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.8
Link : http://ghc.haskell.org/trac/ghc/changeset/2f5a760fbefe8372257ecf27d2af7f34d8a1c05c/ghc
>---------------------------------------------------------------
commit 2f5a760fbefe8372257ecf27d2af7f34d8a1c05c
Author: Yuras Shumovich <shumovichy at gmail.com>
Date: Fri May 2 00:11:58 2014 +0300
Fix compilation of cmm files with -outputdir (Trac #9050)
(cherry picked from commit 2a463ebeba4dff6793ae16707712f1e9245225e8)
>---------------------------------------------------------------
2f5a760fbefe8372257ecf27d2af7f34d8a1c05c
compiler/main/CodeOutput.lhs | 7 ++-----
testsuite/tests/driver/T9050.cmm | 1 +
testsuite/tests/driver/all.T | 4 ++++
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/compiler/main/CodeOutput.lhs b/compiler/main/CodeOutput.lhs
index b8b1872..4a69aac 100644
--- a/compiler/main/CodeOutput.lhs
+++ b/compiler/main/CodeOutput.lhs
@@ -190,11 +190,8 @@ outputForeignStubs dflags mod location stubs
stub_c <- newTempName dflags "c"
case stubs of
- NoStubs -> do
- -- When compiling External Core files, may need to use stub
- -- files from a previous compilation
- stub_h_exists <- doesFileExist stub_h
- return (stub_h_exists, Nothing)
+ NoStubs ->
+ return (False, Nothing)
ForeignStubs h_code c_code -> do
let
diff --git a/testsuite/tests/driver/T9050.cmm b/testsuite/tests/driver/T9050.cmm
new file mode 100644
index 0000000..8b1a393
--- /dev/null
+++ b/testsuite/tests/driver/T9050.cmm
@@ -0,0 +1 @@
+// empty
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index ed0ce0f..69f4cd3 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -395,3 +395,7 @@ test('T2507',
test('T703', normal, run_command, ['$MAKE -s --no-print-directory T703'])
test('T8101', normal, compile, ['-Wall -fno-code'])
+def build_T9050(name, way):
+ return simple_build(name + '.cmm', way, '-outputdir=. ', 0, '', 0, 0, 0)
+test('T9050', normal, build_T9050, [])
+
More information about the ghc-commits
mailing list