File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
samples/arm-picolibc-eabi
scripts/build/companion_libs Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,16 @@ config LIBC_PICOLIBC_GCC_LIBSTDCXX
2020 picolibc. This version is linked when "--specs=picolibcpp.specs"
2121 is specified.
2222
23+ config LIBC_PICOLIBC_GCC_LIBSTDCXX_NOEXCEPT
24+ bool
25+ prompt "Compile libstdc++ picolibc variant with exceptions disabled"
26+ default y
27+ depends on CC_LANG_CXX
28+ help
29+ This option compiles an additional target libstdc++ for use with
30+ picolibc. This version is linked when "--specs=picolibcpp_noexcept.specs"
31+ is specified.
32+
2333config LIBC_PICOLIBC_CXA_ATEXIT
2434 def_bool y
2535 select LIBC_PROVIDES_CXA_ATEXIT
Original file line number Diff line number Diff line change @@ -9,3 +9,4 @@ CT_CC_GCC_MULTILIB_LIST="rmprofile"
99CT_CC_GCC_CONFIG_TLS=y
1010CT_CC_LANG_CXX=y
1111CT_COMP_LIBS_PICOLIBC=y
12+ CT_LIBC_PICOLIBC_GCC_LIBSTDCXX_NOEXCEPT=y
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ do_picolibc_extract() {
2727# flag for libstdc++ "picolibc" variant.
2828do_cc_libstdcxx_picolibc ()
2929{
30+ local variant=" $1 "
3031 local -a final_opts
3132 local final_backend
3233
@@ -44,6 +45,9 @@ do_cc_libstdcxx_picolibc()
4445 if [ " ${CT_LIBC_PICOLIBC_ENABLE_TARGET_OPTSPACE} " = " y" ]; then
4546 final_opts+=( " enable_optspace=yes" )
4647 fi
48+ if [ " ${variant} " = " noexcept" ]; then
49+ final_opts+=( " extra_cxxflags_for_target=-fno-exceptions" )
50+ fi
4751
4852 if [ " ${CT_BARE_METAL} " = " y" ]; then
4953 final_opts+=( " mode=baremetal" )
168172
169173 do_cc_libstdcxx_picolibc
170174
175+ # TODO: suffix
176+ # TODO: specs
177+ if [ " ${CT_LIBC_PICOLIBC_GCC_LIBSTDCXX_NOEXCEPT} " = " y" ]; then
178+ CT_mkdir_pushd noexcept
179+ do_cc_libstdcxx_picolibc noexcept
180+ CT_Popd
181+ fi
182+
171183 if [ " ${CT_STRIP_TARGET_TOOLCHAIN_LIBRARIES} " = " y" ]; then
172184
173185 CT_DoStep INFO " Stripping Picolibc library"
You can’t perform that action at this time.
0 commit comments