[Bug 275018] ports-mgmt/pkg: building with PIE and RELRO is broken when CFLAGS are set

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 10 Nov 2023 22:27:30 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275018

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 pkg project needs to sprinkle PIC/PIE-related flags in different points in
the code. HardenedBSD has a (somewhat ugly) hack that does just that:
https://git.hardenedbsd.org/hardenedbsd/pkg/-/commit/ede6ad08b28a193e88154fab0081c70233d167f6

Otherwise, the PIC/PIE flags get passed to the linking stage for linking
pkg-static. FreeBSD does not currently support static PIEs.

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