You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/07/09 12:20:05 UTC

[incubator-nuttx] branch master updated: libxx: Eanble HAVE_CXXINITIALIZE automatically if LIBCXX or UCLIBCXX enable

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5da9cb3  libxx: Eanble HAVE_CXXINITIALIZE automatically if LIBCXX or UCLIBCXX enable
5da9cb3 is described below

commit 5da9cb3ae6f3de35160f119b64005e6f51d6b947
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Thu Jul 9 01:47:18 2020 +0800

    libxx: Eanble HAVE_CXXINITIALIZE automatically if LIBCXX or UCLIBCXX enable
    
    otherwise the user is shocked that using cin/cout/cerr will crash the system
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
    Change-Id: I453427261f3e2a6e60f7dd2398f7d3bd1043a0d5
---
 boards/arm/imxrt/imxrt1050-evk/configs/libcxxtest/defconfig    | 1 -
 boards/arm/imxrt/imxrt1060-evk/configs/libcxxtest/defconfig    | 1 -
 boards/arm/stm32/stm32f4discovery/configs/cxxtest/defconfig    | 1 -
 boards/arm/stm32/stm32f4discovery/configs/testlibcxx/defconfig | 1 -
 libs/libxx/Kconfig                                             | 2 +-
 5 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/boards/arm/imxrt/imxrt1050-evk/configs/libcxxtest/defconfig b/boards/arm/imxrt/imxrt1050-evk/configs/libcxxtest/defconfig
index d863e93..15232e9 100644
--- a/boards/arm/imxrt/imxrt1050-evk/configs/libcxxtest/defconfig
+++ b/boards/arm/imxrt/imxrt1050-evk/configs/libcxxtest/defconfig
@@ -18,7 +18,6 @@ CONFIG_BUILTIN=y
 CONFIG_C99_BOOL8=y
 CONFIG_FS_PROCFS=y
 CONFIG_HAVE_CXX=y
-CONFIG_HAVE_CXXINITIALIZE=y
 CONFIG_IDLETHREAD_STACKSIZE=2048
 CONFIG_IMXRT_LPUART1=y
 CONFIG_INTELHEX_BINARY=y
diff --git a/boards/arm/imxrt/imxrt1060-evk/configs/libcxxtest/defconfig b/boards/arm/imxrt/imxrt1060-evk/configs/libcxxtest/defconfig
index 5245b18..a2aadfe 100644
--- a/boards/arm/imxrt/imxrt1060-evk/configs/libcxxtest/defconfig
+++ b/boards/arm/imxrt/imxrt1060-evk/configs/libcxxtest/defconfig
@@ -18,7 +18,6 @@ CONFIG_BUILTIN=y
 CONFIG_C99_BOOL8=y
 CONFIG_FS_PROCFS=y
 CONFIG_HAVE_CXX=y
-CONFIG_HAVE_CXXINITIALIZE=y
 CONFIG_IDLETHREAD_STACKSIZE=2048
 CONFIG_IMXRT_LPUART1=y
 CONFIG_INTELHEX_BINARY=y
diff --git a/boards/arm/stm32/stm32f4discovery/configs/cxxtest/defconfig b/boards/arm/stm32/stm32f4discovery/configs/cxxtest/defconfig
index 0f09b73..cce8e37 100644
--- a/boards/arm/stm32/stm32f4discovery/configs/cxxtest/defconfig
+++ b/boards/arm/stm32/stm32f4discovery/configs/cxxtest/defconfig
@@ -18,7 +18,6 @@ CONFIG_C99_BOOL8=y
 CONFIG_DISABLE_ENVIRON=y
 CONFIG_DISABLE_MOUNTPOINT=y
 CONFIG_HAVE_CXX=y
-CONFIG_HAVE_CXXINITIALIZE=y
 CONFIG_HOST_WINDOWS=y
 CONFIG_INTELHEX_BINARY=y
 CONFIG_LIBM=y
diff --git a/boards/arm/stm32/stm32f4discovery/configs/testlibcxx/defconfig b/boards/arm/stm32/stm32f4discovery/configs/testlibcxx/defconfig
index 616e35c..8701476 100644
--- a/boards/arm/stm32/stm32f4discovery/configs/testlibcxx/defconfig
+++ b/boards/arm/stm32/stm32f4discovery/configs/testlibcxx/defconfig
@@ -20,7 +20,6 @@ CONFIG_C99_BOOL8=y
 CONFIG_DISABLE_MOUNTPOINT=y
 CONFIG_EXAMPLES_HELLOXX=y
 CONFIG_HAVE_CXX=y
-CONFIG_HAVE_CXXINITIALIZE=y
 CONFIG_HOST_WINDOWS=y
 CONFIG_INTELHEX_BINARY=y
 CONFIG_LIBCXX=y
diff --git a/libs/libxx/Kconfig b/libs/libxx/Kconfig
index 1fd8004..2079617 100644
--- a/libs/libxx/Kconfig
+++ b/libs/libxx/Kconfig
@@ -24,7 +24,7 @@ if HAVE_CXX
 
 config HAVE_CXXINITIALIZE
 	bool "Have C++ initialization"
-	default n
+	default LIBCXX || UCLIBCXX
 	---help---
 		The platform-specific logic includes support for initialization
 		of static C++ instances for this architecture and for the selected