libc: compile stackchk function by default
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
279a676978
commit
272248de37
@ -18,11 +18,7 @@
|
|||||||
#
|
#
|
||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
|
|
||||||
set(SRCS lib_assert.c)
|
set(SRCS lib_assert.c lib_stackchk.c)
|
||||||
|
|
||||||
if(CONFIG_STACK_CANARIES)
|
|
||||||
list(APPEND SRCS lib_stackchk.c)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CONFIG_ARCH_TOOLCHAIN_GNU AND NOT CONFIG_LTO_NONE)
|
if(CONFIG_ARCH_TOOLCHAIN_GNU AND NOT CONFIG_LTO_NONE)
|
||||||
set_source_files_properties(lib_assert.c DIRECTORY .. PROPERTIES COMPILE_FLAGS
|
set_source_files_properties(lib_assert.c DIRECTORY .. PROPERTIES COMPILE_FLAGS
|
||||||
|
@ -18,11 +18,7 @@
|
|||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
CSRCS += lib_assert.c
|
CSRCS += lib_assert.c lib_stackchk.c
|
||||||
|
|
||||||
ifeq ($(CONFIG_STACK_CANARIES),y)
|
|
||||||
CSRCS += lib_stackchk.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARCH_TOOLCHAIN_GNU),y)
|
ifeq ($(CONFIG_ARCH_TOOLCHAIN_GNU),y)
|
||||||
ifeq ($(CONFIG_LTO_NONE),n)
|
ifeq ($(CONFIG_LTO_NONE),n)
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#ifdef CONFIG_STACK_CANARIES
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -56,5 +54,3 @@ void __stack_chk_fail(void)
|
|||||||
{
|
{
|
||||||
PANIC();
|
PANIC();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_STACK_CANARIES */
|
|
||||||
|
Loading…
Reference in New Issue
Block a user