[Bug 296962] ports-mgmt/pkg 2.8.0_1 fails to link with WITH_PIE

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 21 Jul 2026 14:41:42 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296962

Shawn Webb <shawn.webb@hardenedbsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |shawn.webb@hardenedbsd.org

--- Comment #1 from Shawn Webb <shawn.webb@hardenedbsd.org> ---
The reason is due to the build of pkg-static. PIE cannot be applied there, and
there isn't currently a way to tell the ports framework not to apply PIE to
pkg-static. Instead, PIE needs to be enabled in the pkg project itself, but
only for the pkg binary, not for pkg-static. HardenedBSD carries a patch
downstream to do just that. While FreeBSD might take a different approach,
perhaps HardenedBSD's changes can serve as inspiration for whatever FreeBSD
cooks up.

-- 
You are receiving this mail because:
You are the assignee for the bug.