From ff3fa805a4d4d71e72225b0da04a4348116770ea Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Tue, 27 Oct 2020 10:12:57 +0900 Subject: [PATCH] libxx: Use Kconfig "choice" to specify an implemenetation It doesn't make sense to enable both of LIBCXX and UCLIBCXX. This commit reflects it to Kconfig. --- libs/libxx/Kconfig | 51 +++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/libs/libxx/Kconfig b/libs/libxx/Kconfig index 798ce4bed7..bee4d4e762 100644 --- a/libs/libxx/Kconfig +++ b/libs/libxx/Kconfig @@ -22,6 +22,34 @@ config HAVE_CXX if HAVE_CXX +choice + prompt "C++ Library" + default NUTTX_LIBXX + +config NUTTX_LIBXX + bool "NuttX C++ library" + ---help--- + A fragmentary C++ library that will allow to build only + the simplest of C++ applications. In the deeply embedded world, + that is probably all that is necessary. + +config LIBCXX + bool "LLVM libc++ C++ Standard Library" + select CLOCK_MONOTONIC + select LIBC_WCHAR + select LIBC_LOCALE + ---help--- + LLVM "libc++" C++ Standard Library + https://libcxx.llvm.org/ + +config UCLIBCXX + bool "uClibc++ Standard C++ Library" + ---help--- + uClibc++ C++ library + https://cxx.uclibc.org/ + +endchoice + config HAVE_CXXINITIALIZE bool "Have C++ initialization" default LIBCXX || UCLIBCXX @@ -41,29 +69,6 @@ config CXX_LIBSUPCXX Select if your toolchain provides libsupc++. This option is required at present because the built-in libsupc++ support is incomplete. -comment "LLVM C++ Library (libcxx)" - -config LIBCXX - bool "Build LLVM libcxx (must be installed)" - default n - select CLOCK_MONOTONIC - select LIBC_WCHAR - select LIBC_LOCALE - ---help--- - If you have installed libcxx into the NuttX source tree, then it can - be built by selecting this option. See the README.txt file in the - libcxx package for information on installing libcxx. - -comment "uClibc++ Standard C++ Library" - -config UCLIBCXX - bool "Build uClibc++ (must be installed)" - default n - ---help--- - If you have installed uClibc++ into the NuttX source try, then it can - be built by selecting this option. See the README.txt file in the - uClibc++ packet for information on installing uClibc++. - if UCLIBCXX config UCLIBCXX_BUFSIZE