Page MenuHomeFreeBSD

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

Authored by kevans on Apr 30 2026, 4:44 AM.
Tags
None
Referenced Files
F174249690: D56733.id176973.diff
Thu, Oct 1, 5:37 PM
Unknown Object (File)
Tue, Sep 29, 3:06 AM
Unknown Object (File)
Tue, Sep 29, 2:18 AM
Unknown Object (File)
Mon, Sep 28, 9:13 AM
Unknown Object (File)
Mon, Sep 28, 3:50 AM
Unknown Object (File)
Wed, Sep 2, 5:16 PM
Unknown Object (File)
Aug 29 2026, 2:27 PM
Unknown Object (File)
Aug 29 2026, 3:19 AM

Details

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.

PR: 294881

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 72657
Build 69540: arc lint + arc unit