From bdc86e85d7ea59d7e31c0e863c7463690ddf03a1 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sat, 28 Aug 2021 09:54:14 +0800 Subject: [PATCH] libcxx: Avoid the waring: "__EXCEPTIONS" is not defined, evaluates to 0 [-Werror=undef] Signed-off-by: Xiang Xiao --- ...aring-__EXCEPTIONS-is-not-defined-ev.patch | 28 +++++++++++++++++++ libs/libxx/libcxx.defs | 1 + 2 files changed, 29 insertions(+) create mode 100644 libs/libxx/0001-libc-avoid-the-waring-__EXCEPTIONS-is-not-defined-ev.patch diff --git a/libs/libxx/0001-libc-avoid-the-waring-__EXCEPTIONS-is-not-defined-ev.patch b/libs/libxx/0001-libc-avoid-the-waring-__EXCEPTIONS-is-not-defined-ev.patch new file mode 100644 index 0000000000..a46ea8557b --- /dev/null +++ b/libs/libxx/0001-libc-avoid-the-waring-__EXCEPTIONS-is-not-defined-ev.patch @@ -0,0 +1,28 @@ +From 828208f5061fabe5c42ceee6fb1ab0783c956271 Mon Sep 17 00:00:00 2001 +From: Xiang Xiao +Date: Sat, 28 Aug 2021 09:20:09 +0800 +Subject: [PATCH] [libc++] avoid the waring: "__EXCEPTIONS" is not defined, + evaluates to 0 [-Werror=undef] + +Signed-off-by: Xiang Xiao +Change-Id: If529bbb2f87e55dce5d0df37f2bf72c3d02bf260 +--- + include/__config | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git libcxx/include/__config libcxx/include/__config +index e5828628d..edfe51224 100644 +--- libcxx/include/__config ++++ libcxx/include/__config +@@ -551,7 +551,7 @@ typedef __char32_t char32_t; + + #define _LIBCPP_NORETURN __attribute__((noreturn)) + +-#if !__EXCEPTIONS ++#if !defined(__EXCEPTIONS) + # define _LIBCPP_NO_EXCEPTIONS + #endif + +-- +2.25.1 + diff --git a/libs/libxx/libcxx.defs b/libs/libxx/libcxx.defs index e12e24aa13..85bad008a0 100644 --- a/libs/libxx/libcxx.defs +++ b/libs/libxx/libcxx.defs @@ -28,6 +28,7 @@ libcxx: libcxx-$(VERSION).src.tar.xz --exclude libcxx-$(VERSION).src/test/std/pstl $(Q) mv libcxx-$(VERSION).src libcxx $(Q) patch -p0 < 0001-Remove-the-locale-fallback-for-NuttX.patch + $(Q) patch -p0 < 0001-libc-avoid-the-waring-__EXCEPTIONS-is-not-defined-ev.patch $(Q) touch $@ $(TOPDIR)/include/libcxx: libcxx