diff options
author | Keith Packard <keithp@keithp.com> | 2025-04-20 18:10:26 -0700 |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2025-04-26 15:05:43 +1200 |
commit | 63765c98c0c267e1cc87612ea7373e13113396d9 (patch) | |
tree | 26b3c58e51f2311a95e36e01e1784176ad1e0b28 | |
parent | a23edf42678c0b47705b6f2b3827cce175539330 (diff) | |
download | crosstool-ng-63765c98c0c267e1cc87612ea7373e13113396d9.tar.gz crosstool-ng-63765c98c0c267e1cc87612ea7373e13113396d9.tar.bz2 crosstool-ng-63765c98c0c267e1cc87612ea7373e13113396d9.zip |
picolibc: Add LIBC_PICOLIBC_GCC_LIBSTDCXX_TARGET_CXXFLAGS
This provides additional flags used when building libstdc++ for
picolibc.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | config/comp_libs/picolibc.in | 8 | ||||
-rw-r--r-- | scripts/build/companion_libs/340-picolibc.sh | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/config/comp_libs/picolibc.in b/config/comp_libs/picolibc.in index 4b283aec..c978c35b 100644 --- a/config/comp_libs/picolibc.in +++ b/config/comp_libs/picolibc.in @@ -27,6 +27,14 @@ config LIBC_PICOLIBC_GCC_LIBSTDCXX the picolibc companion library. This version is linked when "--specs=picolibcpp.specs" is specified. +config LIBC_PICOLIBC_GCC_LIBSTDCXX_TARGET_CXXFLAGS + string + prompt "Target CXXFLAGS for libstdc++ picolibc variant" + default "" + help + Used to add extra CXXFLAGS when compiling the target libstdc++ + picolibc library (e.g. -fno-exceptions). + comment "Configuration for picolibc can be found under" comment "* -> C-library" comment "* -> picolibc" diff --git a/scripts/build/companion_libs/340-picolibc.sh b/scripts/build/companion_libs/340-picolibc.sh index 35ee0eaa..94bdaad9 100644 --- a/scripts/build/companion_libs/340-picolibc.sh +++ b/scripts/build/companion_libs/340-picolibc.sh @@ -157,6 +157,9 @@ do_cc_libstdcxx_picolibc() if [ "${CT_LIBC_PICOLIBC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then final_opts+=( "enable_optspace=yes" ) fi + if [ -n "${CT_LIBC_PICOLIBC_GCC_LIBSTDCXX_TARGET_CXXFLAGS}" ]; then + final_opts+=( "extra_cxxflags_for_target=${CT_LIBC_PICOLIBC_GCC_LIBSTDCXX_TARGET_CXXFLAGS}" ) + fi if [ "${CT_BARE_METAL}" = "y" ]; then final_opts+=( "mode=baremetal" ) |