diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h index 088bc9eda3..2aac80e67a 100644 --- a/include/nuttx/compiler.h +++ b/include/nuttx/compiler.h @@ -258,6 +258,16 @@ # 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 */ # define nosanitize_undefined __attribute__((no_sanitize("undefined")))