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/07/30 12:43:35 UTC

[incubator-nuttx] 03/03: Remove the locale fallback from libcxx

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 3c400f32fa257ea2856a6d87c054e9de09097436
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Jul 30 18:40:42 2021 +0800

    Remove the locale fallback from libcxx
    
    since these functions can handled by NuttX's libc now
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 ...0001-Remove-the-locale-fallback-for-NuttX.patch | 55 ++++++++++++++++++++++
 libs/libxx/libcxx.defs                             |  1 +
 2 files changed, 56 insertions(+)

diff --git a/libs/libxx/0001-Remove-the-locale-fallback-for-NuttX.patch b/libs/libxx/0001-Remove-the-locale-fallback-for-NuttX.patch
new file mode 100644
index 0000000..5c90c1f
--- /dev/null
+++ b/libs/libxx/0001-Remove-the-locale-fallback-for-NuttX.patch
@@ -0,0 +1,55 @@
+From fdc60516f58633382ae5d73256a99c7737b174e5 Mon Sep 17 00:00:00 2001
+From: Xiang Xiao <xi...@xiaomi.com>
+Date: Fri, 30 Jul 2021 17:24:51 +0800
+Subject: [PATCH] Remove the locale fallback for NuttX
+
+since these functions can handled by NuttX's libc now
+
+Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
+Change-Id: I68c9f6a690313748e030510d391170d8ca83ee7d
+---
+ include/__locale                  |  2 --
+ include/__support/nuttx/xlocale.h | 18 ------------------
+ 2 files changed, 20 deletions(-)
+ delete mode 100644 include/__support/nuttx/xlocale.h
+
+diff --git libcxx/include/__locale libcxx/include/__locale
+index 77e5faab2..054973e9f 100644
+--- libcxx/include/__locale
++++ libcxx/include/__locale
+@@ -22,8 +22,6 @@
+ #if defined(_LIBCPP_MSVCRT_LIKE)
+ # include <cstring>
+ # include <__support/win32/locale_win32.h>
+-#elif defined(__NuttX__)
+-# include <__support/nuttx/xlocale.h>
+ #elif defined(_AIX) || defined(__MVS__)
+ # include <__support/ibm/xlocale.h>
+ #elif defined(__ANDROID__)
+diff --git libcxx/include/__support/nuttx/xlocale.h libcxx/include/__support/nuttx/xlocale.h
+deleted file mode 100644
+index be738e3b6..000000000
+--- libcxx/include/__support/nuttx/xlocale.h
++++ /dev/null
+@@ -1,18 +0,0 @@
+-// -*- C++ -*-
+-//===-----------------------------------------------------------------------===//
+-//
+-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+-// See https://llvm.org/LICENSE.txt for license information.
+-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+-//
+-//===----------------------------------------------------------------------===//
+-
+-#ifndef _LIBCPP_SUPPORT_NUTTX_XLOCALE_H
+-#define _LIBCPP_SUPPORT_NUTTX_XLOCALE_H
+-
+-#if defined(__NuttX__)
+-#include <__support/xlocale/__posix_l_fallback.h>
+-#include <__support/xlocale/__strtonum_fallback.h>
+-#endif // __NuttX__
+-
+-#endif
+-- 
+2.17.1
+
diff --git a/libs/libxx/libcxx.defs b/libs/libxx/libcxx.defs
index 8540972..c0c6fda 100644
--- a/libs/libxx/libcxx.defs
+++ b/libs/libxx/libcxx.defs
@@ -27,6 +27,7 @@ libcxx: libcxx-$(VERSION).src.tar.xz
 	$(Q) tar -xf 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) touch $@
 
 $(TOPDIR)/include/libcxx: libcxx