From af292daf2b69007bc18f95f298b65c078d2415a1 Mon Sep 17 00:00:00 2001 From: Petro Karashchenko Date: Wed, 17 May 2023 23:05:11 +0300 Subject: [PATCH] include/nuttx: unify feature definition in compiler.h Signed-off-by: Petro Karashchenko --- include/nuttx/compiler.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h index d223433de45..e4a89b888eb 100644 --- a/include/nuttx/compiler.h +++ b/include/nuttx/compiler.h @@ -63,10 +63,10 @@ /* C++ support */ +#undef CONFIG_HAVE_CXX14 + #if defined(__cplusplus) && __cplusplus >= 201402L # define CONFIG_HAVE_CXX14 1 -#else -# undef CONFIG_HAVE_CXX14 #endif /* GCC-specific definitions *************************************************/ @@ -123,6 +123,8 @@ * unnecessary "weak" functions can be excluded from the link. */ +#undef CONFIG_HAVE_WEAKFUNCTIONS + # if !defined(__CYGWIN__) && !defined(CONFIG_ARCH_GNU_NO_WEAKFUNCTIONS) # define CONFIG_HAVE_WEAKFUNCTIONS 1 # define weak_alias(name, aliasname) \ @@ -131,7 +133,6 @@ # define weak_function __attribute__((weak)) # define weak_const_function __attribute__((weak, __const__)) # else -# undef CONFIG_HAVE_WEAKFUNCTIONS # define weak_alias(name, aliasname) # define weak_data # define weak_function