Skip to content

Commit

Permalink
include: ssp: ignore fortify for purecap
Browse files Browse the repository at this point in the history
lib/libc/secure and hence *_chk() libc function variants for SSP are not
built when the world is compiled for the pure-capability ABI.

In such a case, don't define __SSP_FORTIFY_LEVEL, based on
_FORTIFY_SOURCE, that is used to redefine libc functions to their
*_chk() variants. This check matches the check in lib/libc/Makefile to
exclude lib/libc/secure.
  • Loading branch information
kwitaszczyk authored and bsdjhb committed Dec 10, 2024
1 parent af39c8b commit ec8cff0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/ssp/ssp.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#include <sys/cdefs.h>

#if !defined(__cplusplus)
#if !defined(__cplusplus) && !defined(__CHERI_PURE_CAPABILITY__)
# if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && \
(__OPTIMIZE__ > 0 || defined(__clang__))
# if _FORTIFY_SOURCE > 1
Expand Down

0 comments on commit ec8cff0

Please sign in to comment.