summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephanos Ioannidis <root@stephanos.io>2021-06-07 06:13:19 (GMT)
committerStephanos Ioannidis <root@stephanos.io>2021-06-07 10:53:28 (GMT)
commit7144b5f275f380941bffca9509ecb97542c8e5ea (patch)
tree8f49caca6134eab0082abf40600b34c068b61dd9 /scripts
parentfffa4c5aa5b5995ce88680170fb2288b10b05fbe (diff)
newlib: Add libstdc++ nano-specific CXXFLAGS
This commit adds a new config that can be used to specify the target CXXFLAGS specific to the libstdc++ newlib-nano variant. By default, this config is set to specify the `-fno-exceptions` option, which disables C++ exception handling support and greatly reduces the compiled binary size. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/companion_libs/350-newlib_nano.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/build/companion_libs/350-newlib_nano.sh b/scripts/build/companion_libs/350-newlib_nano.sh
index d109070..2d9de1b 100644
--- a/scripts/build/companion_libs/350-newlib_nano.sh
+++ b/scripts/build/companion_libs/350-newlib_nano.sh
@@ -67,6 +67,9 @@ do_cc_libstdcxx_newlib_nano()
if [ "${CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE}" = "y" ]; then
final_opts+=( "enable_optspace=yes" )
fi
+ if [ -n "${CT_NEWLIB_NANO_GCC_LIBSTDCXX_TARGET_CXXFLAGS}" ]; then
+ final_opts+=( "extra_cxxflags_for_target=${CT_NEWLIB_NANO_GCC_LIBSTDCXX_TARGET_CXXFLAGS}" )
+ fi
if [ "${CT_BARE_METAL}" = "y" ]; then
final_opts+=( "mode=baremetal" )