Skip to content
Commit 62bc9bf3 authored by Keith Packard's avatar Keith Packard Committed by Stephanos Ioannidis
Browse files

cmake: Allow selection of libc API overflow detection mode



This adds a choice of three different libc API buffer overflow detection
modes:

 * None
 * Compile-time
 * Compile-time and Run-time

These correspond with the clang/gcc _FORTIFY_SOURCE modes (0/1/2).
_FORTIFY_SOURCE depends on compiler optimizations and require libc support
which the minimal C library doesn't include, so _FORTIFY_SOURCE is disabled
by default in those cases. Native tooling might also enable
_FORTIFY_SOURCE, so don't enable it by default in that case either.

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent 1578a991
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment