diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2024-05-13 05:23:50 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2024-05-13 05:23:50 +0000 |
commit | 9bfd3b4076a7b0dfd27ab22318e5113dc84fea28 (patch) | |
tree | 0e755357e72f4d6c174d903d2a5b94ce39883359 /libexec/rtld-elf | |
parent | e55512504d0178983978d64d67eed1cc85826523 (diff) | |
download | src-9bfd3b4076a7b0dfd27ab22318e5113dc84fea28.tar.gz src-9bfd3b4076a7b0dfd27ab22318e5113dc84fea28.zip |
Add a build knob for _FORTIFY_SOURCE
In the future, we will Default to _FORTIFY_SOURCE=2 if SSP is enabled,
otherwise default to _FORTIFY_SOURCE=0. For now we default it to 0
unconditionally to ease bisect across older versions without the new
symbols, and we'll put out a call for testing.
include/*.h include their ssp/*.h equivalents as needed based on the
knob. Programs and users are allowed to override FORTIFY_SOURCE in their
Makefiles or src.conf/make.conf to force it off.
Reviewed by: des, markj
Relnotes: yes
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D32308
Diffstat (limited to 'libexec/rtld-elf')
-rw-r--r-- | libexec/rtld-elf/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 37c3840538d5..864448ad782a 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -15,6 +15,10 @@ MK_UBSAN= no .include <bsd.compat.pre.mk> +# SSP forced off already implies FORTIFY_SOURCE=0, but we must make sure that +# one cannot turn it back on. +FORTIFY_SOURCE= 0 + .if !defined(NEED_COMPAT) CONFS= libmap.conf .endif |