incubator-nuttx/libs/libc/assert
chao an 4b94dc3092 toolchain/gcc: fix linker error if enable STACK_CANARIES/LTO at same time
If -fstack-protector-all is enabled, gcc linker will need GCC
SSP(Stack Smashing Protector) support, Since the implement of SSP
is related to the OS, most of embedded toolchain does not provide
ssp support, so an error will be reported when linking:

enable CONFIG_LTO_FULL && CONFIG_STACK_CANARIES

arm-none-eabi/bin/ld: cannot find -lssp_nonshared: No such file or directory
arm-none-eabi/bin/ld: cannot find -lssp: No such file or directory

https://github.com/gcc-mirror/gcc/blob/master/gcc/gcc.cc#L983-L985

Since nuttx has already implemented SSP related hook functions,
so in this PR, we filter out this option in the link phase to ensure that
the implementation of lssp/lssp_nonshared will not be referenced

Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-21 01:13:34 +08:00
..
CMakeLists.txt toolchain/gcc: fix linker error if enable STACK_CANARIES/LTO at same time 2023-07-21 01:13:34 +08:00
Make.defs toolchain/gcc: fix linker error if enable STACK_CANARIES/LTO at same time 2023-07-21 01:13:34 +08:00
lib_assert.c assert: Distinguish between assert and exception 2023-05-03 14:49:32 +08:00
lib_stackchk.c