Turn off -ffunction-sections for Printer.c
AbandonedPublic

Authored by simonmar on May 2 2018, 5:15 AM.

Details

Reviewers
bgamari
erikd
Summary

See comments

Test Plan

validate

simonmar created this revision.May 2 2018, 5:15 AM

See inline.

rts/ghc.mk
406

Good call but isn't -fno-function-sections somewhat platform specific? Can we really assume that this flag exists? It seems to me that we should at least guard this on SplitSections.

simonmar requested review of this revision.May 5 2018, 12:35 PM
Phyx added a subscriber: Phyx.May 7 2018, 6:08 AM
Phyx added inline comments.
rts/ghc.mk
406

I'm actually wondering if -fno-function-sections isn't just a Band-Aid here. I assume the actual issue is -gc-sections. I assume the sections are being dropped because they're unreferenced. This probably works because we have *some* reference to Printer.c somewhere but if this reference goes away during a cleanup or something the same issue would pop up again.

You could technically use --require-defined to keep the symbols from being dropped but that's even more linker specific.

I suppose I could add these to the list of -u symbols we already have in package.conf.in.

Phyx added a comment.May 8 2018, 1:12 PM

I suppose I could add these to the list of -u symbols we already have in package.conf.in.

I think that's a bit safer to prevent the regression again. Though if you do go this way also add them to the cabal file so it Doesn't break when we switch to Hadrian :)