linux/tools/include/nolibc
Thomas Weißschuh 818924d129 tools/nolibc: add autodetection for stackprotector support
The stackprotector support in nolibc should be enabled iff it is also
enabled in the compiler.
Use the preprocessor defines added by gcc and clang if stackprotector
support is enable to automatically do so in nolibc.

This completely removes the need for any user-visible API.

To avoid inlining the lengthy preprocessor check into every user
introduce a new header compiler.h that abstracts the logic away.

As the define NOLIBC_STACKPROTECTOR is now not user-relevant anymore
prefix it with an underscore.

Suggested-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/lkml/20230520133237.GA27501@1wt.eu/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-06-09 11:46:08 -07:00
..
.gitignore tools/nolibc: Add gitignore to avoid git complaints about sysroot 2023-03-20 08:45:21 -07:00
arch-aarch64.h tools/nolibc: add autodetection for stackprotector support 2023-06-09 11:46:08 -07:00
arch-arm.h tools/nolibc: add autodetection for stackprotector support 2023-06-09 11:46:08 -07:00
arch-i386.h tools/nolibc: add autodetection for stackprotector support 2023-06-09 11:46:08 -07:00
arch-loongarch.h tools/nolibc: add autodetection for stackprotector support 2023-06-09 11:46:08 -07:00
arch-mips.h tools/nolibc: add autodetection for stackprotector support 2023-06-09 11:46:08 -07:00
arch-riscv.h tools/nolibc: add autodetection for stackprotector support 2023-06-09 11:46:08 -07:00
arch-s390.h tools/nolibc: s390: provide custom implementation for sys_fork 2023-06-09 11:46:07 -07:00
arch-x86_64.h tools/nolibc: add autodetection for stackprotector support 2023-06-09 11:46:08 -07:00
arch.h tools/nolibc: fix typo pint -> point 2023-06-09 11:46:08 -07:00
compiler.h tools/nolibc: add autodetection for stackprotector support 2023-06-09 11:46:08 -07:00
ctype.h tools/nolibc: fix missing includes causing build issues at -O0 2023-01-09 09:36:05 -08:00
errno.h tools/nolibc: make errno a weak symbol instead of a static one 2023-01-10 13:33:55 -08:00
Makefile tools/nolibc: add autodetection for stackprotector support 2023-06-09 11:46:08 -07:00
nolibc.h tools/nolibc: Fix build of stdio.h due to header ordering 2023-06-09 11:45:34 -07:00
signal.h tools/nolibc: fix missing includes causing build issues at -O0 2023-01-09 09:36:05 -08:00
stackprotector.h tools/nolibc: add autodetection for stackprotector support 2023-06-09 11:46:08 -07:00
std.h tools/nolibc: add stdint.h 2023-03-20 08:45:21 -07:00
stdint.h tools/nolibc: add integer types and integer limit macros 2023-03-20 08:45:21 -07:00
stdio.h tools/nolibc: implement fd-based FILE streams 2023-06-09 11:33:05 -07:00
stdlib.h tools/nolibc: use __inline__ syntax 2023-06-09 11:46:07 -07:00
string.h tools/nolibc: use standard __asm__ statements 2023-06-09 11:46:07 -07:00
sys.h tools/nolibc: remove LINUX_REBOOT_ constants 2023-06-09 11:46:07 -07:00
time.h tools/nolibc: fix missing includes causing build issues at -O0 2023-01-09 09:36:05 -08:00
types.h tools/nolibc: remove LINUX_REBOOT_ constants 2023-06-09 11:46:07 -07:00
unistd.h tools/nolibc/unistd: add syscall() 2023-06-09 11:46:07 -07:00