Commit Graph

27 Commits

Author SHA1 Message Date
Xiang Xiao 82550887c2 c++: Change the default value of CXX_STANDARD from c++17 to gnu++17
since many 3rd party code use some gnu c++ extension

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-19 08:21:48 +01:00
Xiang Xiao f64da13e9b libxx: Add CXX_STANDARD to select -std=c++??
and default to "c++17"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-16 15:41:57 +02:00
Peter van der Perk f64677b8c9 Add Embedded Template Library (ETL) support 2022-08-05 09:38:48 +08:00
Jiuzhu Dong 035840a770 libc/wchar: remove unnecessary config
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-27 00:36:49 +08:00
Xiang Xiao 1e0f3ba4da libc: Remove C99_BOOL8 from libs/libxx/Kconfig
since it can be detected automatically by __STDC_VERSION__

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-05 16:23:32 -03:00
Xiang Xiao c1082f04d3 libxx: Make HAVE_CXXINITIALIZE workable even HAVE_CXX isn't enabled
since this infrastructure is also used in no c++ case(e.g. gcov)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-04 08:58:43 +02:00
Gustavo Henrique Nihei 2cd1769619 libxx: Add CXX_RTTI for enabling RTTI support for C++ applications
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-26 05:56:37 +02:00
Xiang Xiao f1ed349dd9 sched/clock: Remove CLOCK_MONOTONIC option from Kconfig
here is the reason:
1.clock_systime_timespec(core function) always exist regardless the setting
2.CLOCK_MONOTONIC is a foundamental clock type required by many places

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 01:21:26 +08:00
Xiang Xiao c8b93ed45e libxx: Move the partial c++ abi implementation to libcxxmini sub folder
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2bc9b8be2962451a44352ab90623c9481bd162b2
2021-08-31 06:52:10 -03:00
Xiang Xiao b0c782255c libxx: Change CXX_LIBSUPCXX to LIBSUPCXX
align with other Kconfig(e.g. LIBCXXABI, LIBCXX, UCLIBCXX)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-28 17:14:48 -03:00
Xiang Xiao ceb8bd4bce libxx: Disable CXX_EXCEPTION by default to save the code space
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I1b1fafa95f0e385a615dba78f43858b797c5ce69
2021-08-28 17:13:43 -03:00
zhuyanlin 528d18ef26 libxx: rename NUTTX_LIBCXX
NUTTX_LIBCXX is only basic C++ support, do not support many c++
library function, NUTTX_NOCXXLIB is more suitable.
When NUTTX_NOCXXLIB is select, do not select lower level support.

Change-Id: I158937a4ba02f8fa3c76101acbdfb295d8cd736f
2021-08-26 19:32:24 +08:00
zhuyanlin 7f48d13c47 libc:libxx: add new low level c++ standard library support
LLVM libc++abi is a new implementation of low level support for
a standard C++ library.

Change-Id: Ica9c81bd96fd27b169a06e352b0c394d47aed5b6
2021-08-26 19:32:24 +08:00
YAMAMOTO Takashi ff3fa805a4 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.
2020-10-28 14:10:30 -03:00
Xiang Xiao ac7e5de5ae libxx: Integrate uClibc++ latest official release
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I05377a0a7674f1cbe461ce67960bd3dc62729337
2020-07-17 21:40:34 +01:00
Xiang Xiao 6abd03d53f libxx: Unify uClibc++ and libc++ config
code just need check CONFIG_CXX_EXCEPTION/CONFIG_CXX_LIBSUPCXX now,
instead uClibc++/libc++ specific config

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3b00a5a6701b8bf1c70de89f2d924592ca3e38b0
2020-07-13 15:08:13 -03:00
Xiang Xiao 5da9cb3ae6 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 <xiaoxiang@xiaomi.com>
Change-Id: I453427261f3e2a6e60f7dd2398f7d3bd1043a0d5
2020-07-09 13:19:54 +01:00
Xiang Xiao 8153e31753 sched: Call c++ global variables constructor inside nxtask_startup
to avoid the similar code spread around each application

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8967d647eaf2ecae47f29f83e7fa322ef1b42a02
2020-07-01 07:55:33 -06:00
Xiang Xiao e7d9260014 arch: Customize the typedef of size_t instead of intptr_t
To ensure size_t same as toolchain definition in the first place and rename CXX_NEWLONG to ARCH_SIZET_LONG.  The change also check whether __SIZE_TYPE__ exist before CONFIG_ARCH_SIZET_LONG so our definition can align with toolchain(gcc/clang) definition automatically.
2020-02-18 07:15:19 -06:00
Xiang Xiao 1e3f457c9e Remove TIME_EXTENDED option to more conform C standard
Gregory Nutt <gnutt@nuttx.org>

    Run all .c and .h files modified in this PR through nxstyle and correct all coding standard problems.

Xiang Xiao <xiaoxiang@xiaomi.com>

    Remove TIME_EXTENDED option to more conform C standard

    Note: the code/data size increment is small
2020-01-23 08:17:22 -06:00
Matias N 8ccb5fabf8 libs/libxx/Kconfig: CONFIG_LIBC_LOCALE is needed to build libcxx. A
math library is also needed, however, here are various ways to provide a
math library so CONFIG_LIBM is not now set.

boards/arm/stm32l4/nucleo-l476rg/scripts/Make.defs:  Add required
definitiions if libcxx is enabled.
2019-10-12 08:51:13 +08:00
Daniel Pereira Volpato 0566525764 libs/libxx/Kconfig: Automatically select CONFIG_CLOCK_MONOTONIC when CONFIG_LIBCXX is selected.
Remove hardcoded -DCLOCK_MONOTONIC from CFLAGS in Make.defs of several configurations.  That defintiion is now automatically adding this define when CONFIG_LIBCXX=y.
2019-09-27 12:31:08 -06:00
Juha Niskanen e8b5dd4528 Fix use of undefined pp-token #errror, other typos. 2019-09-19 18:19:18 -06:00
Gregory Nutt 7dd81cc5c2 libs/libxx/Kconfig: utomatically select CONFIG_LIBC_WCHAR and CONFIG_TIME_EXTENDED when CONFIG_LIBCXX is selected since libcxx compile fails if without these two option 2019-01-27 07:00:07 -06:00
Xiang Xiao 38ffb98f1b Kconfig files, binfmt/libelf, libs/libc/machin, libs/libxx: Correct libcxx exception handling by introducing the generic config(CXX_EXCEPTION and CXX_LIBSUPCXX) 2019-01-26 11:23:31 -06:00
Gregory Nutt a04d2eeb10 tools/Directories.mk: Correct the path to the installed libcxx directory. 2018-09-13 14:03:09 -06:00
Gregory Nutt cf99fb40c9 This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now.
Squashed commit of the following:

    libs/libxx:  Fix some confusing in naming.  If the directory is called libxx, then the library must be libxx.a (unless perhaps LIBCXX is selected).
    libs/:  Fix paths in moved library directories.
    libs:  Brute force move of libc, libnx, and libxx to libs.  Cannot yet build it in that configuration.
2018-05-29 13:21:26 -06:00