Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,253
    • Issues 5,253
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 562
    • Merge requests 562
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #3687
Closed
Open
Issue created Nov 24, 2009 by Neil Mitchell@ndmitchellReporter

Merge _stub.o files back in to the .o file

GHC sometimes generates _stub.o files. When it does, ghci doesn't work with compiled files (it forgets to include the _stub.o in the files to link against), and it complicates many building rules (including those inside GHC's makefile).

It would be far better if the _stub.o files were merged back in with the original. This is actually reasonably easy:

b <- doesFileExist stub
when b $ do
    let tmp = res <.> "tmp.o"
    mv obj tmp
    exec ["ld","-r","-o",obj,tmp,stub]
    rm stub
    rm tmp

While being mainly a feature request, this enhancement also fixes a bug with GHCi loading files with _stub's, so includes a bug fix for free.

Trac metadata
Trac field Value
Version 6.10.4
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking