libcxx: Avoid the waring: "__EXCEPTIONS" is not defined, evaluates to 0 [-Werror=undef]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2021-08-28 09:54:14 +08:00 committed by Gustavo Henrique Nihei
parent 95ff2e16a3
commit bdc86e85d7
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,28 @@
From 828208f5061fabe5c42ceee6fb1ab0783c956271 Mon Sep 17 00:00:00 2001
From: Xiang Xiao <xiaoxiang@xiaomi.com>
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 <xiaoxiang@xiaomi.com>
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

View File

@ -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