You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2021/08/28 20:13:48 UTC

[incubator-nuttx] 01/04: libcxxabi: Avoid the waring: "__EXCEPTIONS" is not defined, evaluates to 0 [-Werror=undef]

This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 95ff2e16a37bbde94f7814d8e0d3e4e224031da4
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Aug 28 02:16:23 2021 +0800

    libcxxabi: Avoid the waring: "__EXCEPTIONS" is not defined, evaluates to 0 [-Werror=undef]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 ...oid-the-waring-__EXCEPTIONS-is-not-define.patch | 28 ++++++++++++++++++++++
 libs/libxx/libcxxabi.defs                          |  1 +
 2 files changed, 29 insertions(+)

diff --git a/libs/libxx/0001-libc-abi-avoid-the-waring-__EXCEPTIONS-is-not-define.patch b/libs/libxx/0001-libc-abi-avoid-the-waring-__EXCEPTIONS-is-not-define.patch
new file mode 100644
index 0000000..3a2d0e8
--- /dev/null
+++ b/libs/libxx/0001-libc-abi-avoid-the-waring-__EXCEPTIONS-is-not-define.patch
@@ -0,0 +1,28 @@
+From d74ec1669d8f09d2ac9289423b51ae8b3af13d11 Mon Sep 17 00:00:00 2001
+From: Xiang Xiao <xi...@xiaomi.com>
+Date: Sat, 28 Aug 2021 02:11:15 +0800
+Subject: [PATCH] [libc++abi] avoid the waring: "__EXCEPTIONS" is not defined,
+ evaluates to 0 [-Werror=undef]
+
+Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
+Change-Id: I228cf44401f7ef9d7f49d8b806177bae1242d674
+---
+ include/__cxxabi_config.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git libcxxabi/include/__cxxabi_config.h libcxxabi/include/__cxxabi_config.h
+index cffedb8..05ed8b6 100644
+--- libcxxabi/include/__cxxabi_config.h
++++ libcxxabi/include/__cxxabi_config.h
+@@ -93,7 +93,7 @@
+ #  if !__has_feature(cxx_exceptions)
+ #    define _LIBCXXABI_NO_EXCEPTIONS
+ #  endif
+-#elif defined(_LIBCXXABI_COMPILER_GCC) && !__EXCEPTIONS
++#elif defined(_LIBCXXABI_COMPILER_GCC) && !defined(__EXCEPTIONS)
+ #  define _LIBCXXABI_NO_EXCEPTIONS
+ #endif
+ 
+-- 
+2.25.1
+
diff --git a/libs/libxx/libcxxabi.defs b/libs/libxx/libcxxabi.defs
index c378d72..d9e8bab 100644
--- a/libs/libxx/libcxxabi.defs
+++ b/libs/libxx/libcxxabi.defs
@@ -26,6 +26,7 @@ libcxxabi-$(VERSION).src.tar.xz:
 libcxxabi: libcxxabi-$(VERSION).src.tar.xz
 	$(Q) tar -xf libcxxabi-$(VERSION).src.tar.xz
 	$(Q) mv libcxxabi-$(VERSION).src libcxxabi
+	$(Q) patch -p0 < 0001-libc-abi-avoid-the-waring-__EXCEPTIONS-is-not-define.patch
 	$(Q) touch $@
 
 distclean::