Bug 239007 - lang/gcc8 enable secure-plt by default for powerpc*
Summary: lang/gcc8 enable secure-plt by default for powerpc*
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Some People
Assignee: Andreas Tobler
Depends on:
Reported: 2019-07-05 19:40 UTC by Justin Hibbits
Modified: 2019-07-08 19:50 UTC (History)
1 user (show)

See Also:

Patch unconditionally enabling secure-PLT for FreeBSD/powerpc* (500 bytes, patch)
2019-07-05 19:40 UTC, Justin Hibbits
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Hibbits freebsd_committer 2019-07-05 19:40:35 UTC
Created attachment 205535 [details]
Patch unconditionally enabling secure-PLT for FreeBSD/powerpc*

The attached patch, probably incomplete, enables secure PLT for powerpc* (powerpc, powerpcspe, powerpc64).  The "correct" way would probably be to enable it only for 12 and later (12 will be getting secure-PLT in base after a 1 month burn-in period in head).
Comment 1 Gerald Pfeifer freebsd_committer 2019-07-05 19:48:56 UTC
Andreas, what is your take?

IMO this should go upstream (GCC 10, ideally also GCC 9) first.
Comment 2 Andreas Tobler freebsd_committer 2019-07-06 18:06:44 UTC
Hm, the linker option --secure-plt is not known to 64-bit ld, do I miss something?
Comment 3 Justin Hibbits freebsd_committer 2019-07-07 00:06:40 UTC
Andreas, I see the same thing.  secure-plt really should be configured, in the specs config, as only enabled if -m32 is specified, since it's *only* for 32-bit powerpc.  So maybe that can be done by changing secureplt.h?  I have no idea.
Comment 4 Andreas Tobler freebsd_committer 2019-07-08 19:50:21 UTC
Well, I need some time. Currently native buildworld doesn't complete due to this --secure-plt in bsd.cpu.mk. The gen* helpers die during building system gcc.