-
Notifications
You must be signed in to change notification settings - Fork 1.4k
libs: Add support for latest LLVM LIBCXX and LIBCXXABI version 21.1.8 #17826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
libs: Add support for latest LLVM LIBCXX and LIBCXXABI version 21.1.8 #17826
Conversation
This commit adds support for LLVM libcxx and libcxxabi version 21.1.8, including necessary patches and CMake configuration for building with NuttX. Signed-off-by: Bartosz <[email protected]>
Fix exception handling issues in libcxx and libcxxabi to work properly with NuttX's exception model. Signed-off-by: Bartosz <[email protected]>
Add necessary changes to support ESP32 RISC-V initialization with proper C++ constructor handling including code style fixes. Signed-off-by: Bartosz <[email protected]>
6522e0c to
0b3dd30
Compare
This commit adds support for threads using pthread support. Signed-off-by: Bartosz <[email protected]>
Remove flag for long-calls for arm architecture. Signed-off-by: Bartosz <[email protected]>
boards/sim/: Change gcc to clang This commit will update Docker file to latest Ubuntu LTS with update of GCC for ARM and RISCV. Also SIM boards with LIBCXX are build with clang because GCC < 15 have lack of some builtin features. Signed-off-by: Bartosz <[email protected]>
Fix cmake formatting. Signed-off-by: Bartosz <[email protected]>
Change mcmodel to large and update bloaty to latest version Signed-off-by: Bartosz <[email protected]>
Fix patches includes in libcxx. Signed-off-by: Bartosz <[email protected]>
Update Clang to version 21. Signed-off-by: Bartosz <[email protected]>
Fix version of Clang-21 for Ubuntu jammy Signed-off-by: Bartosz <[email protected]>
|
@Barto22 please move Docker related change to new pr, so we can merge it first and then verify whether this pr can pass ci. |
| ifneq ($(CONFIG_CXX_RTTI),y) | ||
| ARCHCXXFLAGS += -fno-rtti | ||
| endif | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert
| { | ||
| #if defined(CONFIG_ARCH_SIM) && defined(CONFIG_HOST_MACOS) | ||
| macho_call_saved_init_funcs(); | ||
| #elif defined(USE_ESP32_XTENSA_INIT_ARRAYS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why add esp32 specific code in the common place? it's better to adjust esp32 riscv ld to conform the requirement.
|
|
||
| ARCHPICFLAGS = -fpic | ||
|
|
||
| ifeq ($(CONFIG_SIM_TOOLCHAIN_CLANG),y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to split the change not directly related to c++23 upgrade to new pr to boost the review proccess.
Summary
This PR updates the build environment to use the latest Ubuntu 24.04 LTS base image and upgrades the GNU toolchains to:
All SIM board configurations that enable LIBCXX are now built with clang, as GCC < 15 lacks required builtin features for C++23 and libc++.
This continues the integration effort for LLVM libc++ and libc++abi (v21.1.8) in NuttX, enabling modern C++23-compatible standard library components including new language features and exception handling.
Impact
Current status:
makeandcmakeNo impact to existing boards or applications unless enabling libc++.
Testing
Host environment:
Boards / Configurations tested:
stm32f4discovery:testlibcxxesp32c3-devkit:testlibcxxToolchains:
Procedure:
makeandcmakeStatus:
Logs and additional validation data are available on request.