Force findPtr to be included in the binary
ClosedPublic

Authored by simonmar on May 9 2018, 3:01 PM.

Details

Summary

A better alternative to D4657.

Test Plan
cd testsuite/tests/codeGen/should_run
../../../../inplace/bin/ghc-stage2 -debug cgrun001
nm cgrun001 | grep findPtr

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
simonmar created this revision.May 9 2018, 3:01 PM
simonmar updated this revision to Diff 16356.May 9 2018, 3:04 PM

also update rts.cabal.in

Phyx accepted this revision.May 9 2018, 4:59 PM

Thanks @simonmar ! I'm not sure what those backpack failures are about.. but they seem unrelated.

@bgamari have you seen those before?

This revision is now accepted and ready to land.May 9 2018, 4:59 PM

The backpack failures are from D4659 (I stacked this diff on top of that one in my tree)

Phyx added a comment.May 10 2018, 3:49 AM

Ah ok, that explains it. It seemed very strange to get an interface error from a new symbol

bgamari accepted this revision.May 15 2018, 12:20 PM

Indeed this is much better.

This revision was automatically updated to reflect the committed changes.
snowleopard added inline comments.
rts/rts.cabal.in
255

@simonmar @bgamari Should this also be conditional on DEBUG, as in rts/package.conf.in? Hadrian is currently failing as described here: https://github.com/snowleopard/hadrian/issues/614. I think the reason is that this flag is passed to the linker even when there really is no symbol _findPtr.

Indeed this symbol is currently only defined with -DDEBUG so either we should export a stub in the non-DEBUG case or make these conditional.

rts/rts.cabal.in
255

Yes it should. Good catch1

328

And the same here.