This is an automated email from the ASF dual-hosted git repository. archer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit c95a9fc304c40750ab1678187987c84263d00420 Author: guoshichao <[email protected]> AuthorDate: Sat Aug 10 15:59:33 2024 +0800 greenhills: add empty "__extension__" definition to fix build error "libcxxmini/libxx_cxa_guard.cxx", line 47: error #77-D: this declaration has no storage class or type specifier __extension__ typedef int __guard __attribute__((mode(__DI__))); ^ "libcxxmini/libxx_cxa_guard.cxx", line 47: error #65: expected a ";" __extension__ typedef int __guard __attribute__((mode(__DI__))); ^ "libcxxmini/libxx_cxa_guard.cxx", line 64: error #20: identifier "__guard" is undefined int __cxa_guard_acquire(FAR __guard *g) ^ "libcxxmini/libxx_cxa_guard.cxx", line 64: error #20: identifier "g" is undefined int __cxa_guard_acquire(FAR __guard *g) ^ "libcxxmini/libxx_cxa_guard.cxx", line 65: error #65: expected a ";" { ^ "libcxxmini/libxx_cxa_guard.cxx", line 93: warning #12-D: parsing restarts here after previous syntax error } Signed-off-by: guoshichao <[email protected]> --- include/nuttx/compiler.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h index eb928d4c74..487c5abc02 100644 --- a/include/nuttx/compiler.h +++ b/include/nuttx/compiler.h @@ -87,12 +87,20 @@ # define CONFIG_HAVE_CXX14 1 #endif +/* Green Hills Software definitions *****************************************/ + +#if defined(__ghs__) + +# define __extension__ + +#endif + /* GCC-specific definitions *************************************************/ #ifdef __GNUC__ /* Built-ins */ -# if __GNUC__ >= 4 +# if __GNUC__ >= 4 && !defined(__ghs__) # define CONFIG_HAVE_BUILTIN_BSWAP16 1 # define CONFIG_HAVE_BUILTIN_BSWAP32 1 # define CONFIG_HAVE_BUILTIN_BSWAP64 1
