Page MenuHomeFreeBSD

build: provide a FORTIFY_SOURCE.<src file> override
AcceptedPublic

Authored by kevans on Sat, May 30, 2:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 9, 6:11 AM
Unknown Object (File)
Sun, Jun 7, 12:27 AM
Unknown Object (File)
Sat, Jun 6, 4:36 AM
Unknown Object (File)
Fri, Jun 5, 9:53 PM
Unknown Object (File)
Fri, Jun 5, 7:55 PM
Unknown Object (File)
Fri, Jun 5, 8:05 AM
Unknown Object (File)
Thu, Jun 4, 4:10 PM
Unknown Object (File)
Thu, Jun 4, 12:30 PM

Details

Reviewers
markj
des
sjg
Summary

For native files we can do more minimal fixes to avoid this large of a
hammer, but for third party files it may not be worth the effort to try
and patch them. NetBSD has the original _FORTIFY_SOURCE implementation
that ours is based on, for instance, but tests sourced from there can't
do an __ssp_real(foo) without being certain that foo actually has a
fortified definition.

This change does always define _FORTIFY_SOURCE as a result, so gate it
on CFLAGS not already containing _FORTIFY_SOURCE definitions.

This re-applies c46a0b59071614, but without re-defining _FORTIFY_SOURCE
needlessly.

PR: 294881

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73568
Build 70451: arc lint + arc unit

Event Timeline

This will re-fix the getgroups test with FORTIFY_SOURCE > 0; the use of FORTIFY_SOURCE.<foo> there wasn't reverted when the implementation was.

It's hard for me to judge whether this is the best way to handle it, but it seems to work.

share/mk/bsd.sys.mk
314

Should this be grouped with the block you modified?

328
This revision is now accepted and ready to land.Fri, Jun 5, 2:10 PM