mirror of
https://github.com/apache/nuttx.git
synced 2026-05-19 03:03:37 +08:00
f17b82bd65
This patch adds support for building libsupc++ (the C++ runtime support library from GCC's libstdc++-v3). libsupc++ provides core C++ runtime support including: - Exception handling (eh_*.cc) - RTTI (Run-Time Type Information) - Memory allocation operators (new/delete) - Type info support The implementation includes: - libsupc++.defs for libsupc++ build integration - support make and cmake build - Use gthr.h, gthr-posix.h and unwind-pe.h from libgcc - LIBSTDCXX_VERSION config option with default 14.2.0 Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
162 lines
3.5 KiB
Plaintext
162 lines
3.5 KiB
Plaintext
#
|
|
# For a description of the syntax of this configuration file,
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
#
|
|
|
|
comment "Basic CXX Support"
|
|
|
|
config HAVE_CXX
|
|
bool "Have C++ compiler"
|
|
default n
|
|
---help---
|
|
Toolchain supports C++ and CXX, CXXFLAGS, and COMPILEXX have been
|
|
defined in the configurations Make.defs file.
|
|
|
|
config HAVE_CXXINITIALIZE
|
|
bool "Have C++ initialization"
|
|
default n
|
|
---help---
|
|
The platform-specific logic includes support for initialization
|
|
of static C++ instances for this architecture and for the selected
|
|
toolchain.
|
|
|
|
if HAVE_CXX
|
|
|
|
choice
|
|
prompt "C++ Library"
|
|
default LIBCXXNONE
|
|
|
|
config LIBCXXNONE
|
|
bool "No default C++ Standard Template Library"
|
|
|
|
config LIBCXXTOOLCHAIN
|
|
bool "Toolchain C++ support"
|
|
select HAVE_CXXINITIALIZE
|
|
---help---
|
|
Use Standard C++ library from toolchain.
|
|
|
|
config LIBCXX
|
|
bool "LLVM libc++ C++ Standard Library"
|
|
select HAVE_CXXINITIALIZE
|
|
select PTHREAD_MUTEX_TYPES
|
|
depends on TLS_NELEM > 0
|
|
---help---
|
|
LLVM "libc++" C++ Standard Library
|
|
https://libcxx.llvm.org/
|
|
|
|
config UCLIBCXX
|
|
bool "uClibc++ Standard C++ Library"
|
|
select HAVE_CXXINITIALIZE
|
|
depends on ALLOW_GPL_COMPONENTS
|
|
---help---
|
|
uClibc++ C++ library
|
|
https://cxx.uclibc.org/
|
|
|
|
endchoice
|
|
|
|
config ETL
|
|
bool "Embedded Template Library (ETL)"
|
|
depends on ALLOW_MIT_COMPONENTS
|
|
---help---
|
|
ETL A C++ Template library for Embedded applications
|
|
Implements C++ templates such as containers, string
|
|
singleton math without C++ STL libraries
|
|
|
|
choice
|
|
prompt "C++ low level library select"
|
|
default LIBMINIABI if LIBCXXNONE
|
|
default LIBSUPCXX_TOOLCHAIN
|
|
|
|
config LIBMINIABI
|
|
bool "Basic C++ support"
|
|
---help---
|
|
A fragmentary C++ library that will allow to build only
|
|
the simplest of C++ applications. Only contain basic C++
|
|
runtime support function.
|
|
|
|
config LIBCXXABI
|
|
bool "LLVM low level C++ Library"
|
|
---help---
|
|
LLVM "libc++abi" C++ Standard Library
|
|
https://libcxxabi.llvm.org/
|
|
Select if your use libc++abi as lower level c++ library
|
|
|
|
config LIBSUPCXX
|
|
bool "GNU compile low level libsupc++"
|
|
---help---
|
|
Select if your compile libsupc++ and use libsupc++ as lower
|
|
level c++ library.
|
|
|
|
config LIBSUPCXX_TOOLCHAIN
|
|
bool "GNU low level libsupc++"
|
|
---help---
|
|
Select if your toolchain provides libsupc++ and use toolchain libsupc++ as lower
|
|
level c++ library.
|
|
|
|
endchoice
|
|
|
|
config LIBCXXABI_VERSION
|
|
string "Select libcxxabi version"
|
|
depends on LIBCXXABI
|
|
default LIBCXX_VERSION if LIBCXX
|
|
default "17.0.6" if !LIBCXX
|
|
|
|
config LIBSTDCXX_VERSION
|
|
string "Select libstdcxx version"
|
|
depends on LIBSUPCXX
|
|
default "14.2.0"
|
|
|
|
config CXX_STANDARD
|
|
string "Language standard"
|
|
default "c++14" if TRICORE_TOOLCHAIN_TASKING
|
|
default "gnu++20" if LIBCXX
|
|
default "gnu++17" if !LIBCXX
|
|
---help---
|
|
Possible values:
|
|
gnu++98/c++98, gnu++11/c++11, gnu++14/c++14, gnu++17/c++17 and gnu++20/c++20
|
|
|
|
config CXX_EXCEPTION
|
|
bool "Enable Exception Support"
|
|
|
|
config CXX_RTTI
|
|
bool "Enable RTTI Support"
|
|
|
|
config CXX_WCHAR
|
|
bool "Enable Wide Character Support"
|
|
|
|
choice
|
|
prompt "C++ Locale and Stream select"
|
|
default CXX_NO_LOCALIZATION
|
|
|
|
config CXX_NO_LOCALIZATION
|
|
bool "No Locale and Stream Support"
|
|
|
|
config CXX_MINI_LOCALIZATION
|
|
bool "Enable mini Locale and Stream Support"
|
|
|
|
config CXX_LOCALIZATION
|
|
bool "Enable Locale and Stream Support"
|
|
depends on LIBC_LOCALE
|
|
|
|
endchoice
|
|
|
|
if UCLIBCXX
|
|
|
|
config UCLIBCXX_BUFSIZE
|
|
int "IO Stream/Container Buffer Size"
|
|
default 32
|
|
|
|
endif
|
|
|
|
config LIBCXX_VERSION
|
|
string "Select libcxx version"
|
|
depends on LIBCXX
|
|
default "17.0.6"
|
|
|
|
config LIBCXX_TEST
|
|
bool "LLVM Libcxx Library Test"
|
|
depends on LIBCXX && CXX_EXCEPTION
|
|
default n
|
|
|
|
endif
|