toolchain/ghs: Fix unknown attribute warnings
"string/lib_strlen.c", line 54: warning #1097-D: unknown attribute "no_sanitize_address" nosanitize_address "string/lib_strncpy.c", line 81: warning #1097-D: unknown attribute "no_sanitize_address" nosanitize_address "string/lib_strncmp.c", line 58: warning #1097-D: unknown attribute "no_sanitize_address" nosanitize_address "string/lib_strchr.c", line 73: warning #1097-D: unknown attribute "no_sanitize_address" nosanitize_address "string/lib_strcpy.c", line 68: warning #1097-D: unknown attribute "no_sanitize_address" nosanitize_address "procfs/fs_procfstcbinfo.c", line 185: warning #1097-D: unknown attribute "optimize" nooptimiziation_function Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
This commit is contained in:
parent
f6b3e92b6c
commit
ac26e83a45
@ -258,6 +258,16 @@
|
|||||||
|
|
||||||
# define nosanitize_address __attribute__((no_sanitize_address))
|
# define nosanitize_address __attribute__((no_sanitize_address))
|
||||||
|
|
||||||
|
/* the Greenhills compiler do not support the following atttributes */
|
||||||
|
|
||||||
|
# if defined(__ghs__)
|
||||||
|
# undef nooptimiziation_function
|
||||||
|
# define nooptimiziation_function
|
||||||
|
|
||||||
|
# undef nosanitize_address
|
||||||
|
# define nosanitize_address
|
||||||
|
# endif
|
||||||
|
|
||||||
/* The nosanitize_undefined attribute informs GCC don't sanitize it */
|
/* The nosanitize_undefined attribute informs GCC don't sanitize it */
|
||||||
|
|
||||||
# define nosanitize_undefined __attribute__((no_sanitize("undefined")))
|
# define nosanitize_undefined __attribute__((no_sanitize("undefined")))
|
||||||
|
Loading…
Reference in New Issue
Block a user