[GHC] #8812: Make *_stub.c files available again
#8812: Make *_stub.c files available again ------------------------------------+------------------------------------- Reporter: ralphb | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- In our project we would like to link Haskell functions into C++ code. In principle this works fine using FFI. An additional constraint, however, is that we need to generate and link the object files ourselves. Alas, ghc no longer keeps the *_stub.c files around. (And fishing for files in /tmp is not a viable solution.) I would like to propose an additional command line switch to keep *_stub.c files, as previous compiler versions did by default. (Note that there is an older, similar request #7463, but our use case is much broader than that and not limited to unregistered compilation.) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8812> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8812: Make *_stub.c files available again -------------------------------------+------------------------------------- Reporter: ralphb | Owner: Type: feature | Status: new request | Milestone: Priority: normal | Version: 7.6.3 Component: Driver | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thomie): * component: Compiler => Driver Comment: For reference, the last major change to the handling of *_stub.c files was in: {{{ commit 7b0ff1792d699ff02a604163c9ccf4a98a1ca3eb Author: Simon Marlow <marlowsd@gmail.com> Date: Mon Jan 31 10:32:24 2011 +0000 Merge _stub.o files into the main .o file (Fixes #3687 and #706) Now GHC still generates the _stub.c files, but the object file is automatically merged into the main .o file for a module. This means that build systems (including GHC's own) no longer need to worry about looking for _stub.o files and including them when linking. I had to do lots of refactoring in DriverPipeline to make this work; now there's a monad to carry around all the information, and everything is a lot tidier. The _stub.c is now created as a temporary file and removed after compilation (unless the -keep-tmp-files flag is on). }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8812#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC