Opened 4 years ago

Closed 4 years ago

#10660 closed bug (fixed)

.dyn_o isn't generated for .hsig files with -dynamic-too

Reported by: spinda Owned by: spinda
Priority: normal Milestone: 7.10.3
Component: Compiler Version: 7.10.1
Keywords: backpack Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D1084
Wiki Page:


This causes the linker to error out later on, as it expects a .dyn_o file to exist for each .hsig file.

Change History (6)

comment:1 Changed 4 years ago by spinda

Owner: set to spinda

comment:2 Changed 4 years ago by spinda

Differential Rev(s): Phab:D1084

comment:3 Changed 4 years ago by hvr

Keywords: backpack added
Milestone: 7.10.3
Status: newpatch

comment:4 Changed 4 years ago by Ben Gamari <ben@…>

In d2b4df1/ghc:

Generate .dyn_o files for .hsig files with -dynamic-too

With -dynamic-too, .dyn_o files were not being generated for .hsig
files.  Normally, this is handled in the pipeline; however, the branch
for .hsig files called compileEmptyStub directly instead of going
through runPipeline.  When compiling a Cabal package that included .hsig
files, this triggered a linker error later on, as it expected a .dyn_o
file to have been generated for each .hsig.

The fix is to use runPipeline for .hsig files, just as with .hs files.
Alternately, one could duplicate the logic for handling -dynamic-too in
the .hsig branch, but simply calling runPipeline ends up being much

Test Plan: validate

Reviewers: austin, ezyang, bgamari, thomie

Reviewed By: ezyang, thomie

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #10660

comment:5 Changed 4 years ago by bgamari

Status: patchmerge

comment:6 Changed 4 years ago by bgamari

Resolution: fixed
Status: mergeclosed

Merged to ghc-7.10.

Note: See TracTickets for help on using tickets.