#4451: Re-linking avoidance is too aggressive
---------------------------------+------------------------------------------
Reporter: simonmar | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.2.1
Component: Compiler | Version: 7.1
Keywords: | Testcase:
Blockedby: | Difficulty: Moderate (less than a day)
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: Other
---------------------------------+------------------------------------------
I'm constantly annoyed by having to `rm` the binary when I want to relink
with different options (`-rtsopts`, `-threaded`, etc.). We only check the
date of the binary against the date of the object files and relink if it
is out of date, we should really check whether the options have changed or
not too.
Similar problems exist in ordinary `.hs` recompilation (see #437), but the
solutions will be different, so it makes sense to have a separate ticket.
One solution is to store information about what settings were in effect
when linking in the binary, perhaps in a special section that isn't loaded
during execution. We already compile a C file during linking to support
`-rtsopts`, so we could add some magic asm to it, and then use `objdump`
during linking to extract the information from the existing binary if
there is one.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4451>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs