Upgrade arm-none-eabi compiler
It was 5 years out of date and didn't fully support C++20.
In doing so, flip off "freestanding" mode for the cortex-m4f compiler's
use of libstdc++.
This is because some libraries appear to have been using STL headers
that cannot be safely linked against in freestanding mode (e.g.,
<ostream>). I am unsure why the prior compiler was not catching this.
If this becomes a problem, we can disable it.
Change-Id: Ie08ce2c089f787b0433a761ad2242dcd2a516404
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
diff --git a/tools/cpp/toolchain_config.bzl b/tools/cpp/toolchain_config.bzl
index 8bab5c7..5e320cd 100644
--- a/tools/cpp/toolchain_config.bzl
+++ b/tools/cpp/toolchain_config.bzl
@@ -296,7 +296,6 @@
"-pipe",
"-g",
"-fno-common",
- "-ffreestanding",
"-fbuiltin",
],
),
@@ -797,7 +796,7 @@
actions = all_cpp_compile_actions,
flag_groups = [
flag_group(
- flags = ["--std=gnu++1z", "-fno-exceptions", "-fno-rtti"],
+ flags = ["--std=gnu++20", "-fno-exceptions", "-fno-rtti"],
),
],
),