Arm-none-eabi-g++ is version 6.3.1 on i386

I’m trying to build for ARM Cortex on an i686 laptop running Debian 11.6 (32-bit).

All the tools and PlatformIO CLI install just fine, but it seems to be pulling in an older g++ which does not support all of -std=c++17 (e.g. if constexpr (...) {...}). Details here:

On my 64-bit Intel Mac, I get gcc/g++ version 7.2.1 - likewise on a 32-bit Raspberry Pi. Is there any chance of finding a (slightly) newer gcc-for-arm, running on 32-bit Linux somewhere?

(I understand that 32-bit hosts are on the way out, but there are surely still quite a few working machines out there, which would work fine as dedicated build setups.)

Update: this did not work, alas:

$ pio pkg install -g --tool "platformio/toolchain-gccarmnoneeabi@1.70201.0"
Tool Manager: Installing platformio/toolchain-gccarmnoneeabi @ 1.70201.0
Error: Could not find the package with 'platformio/toolchain-gccarmnoneeabi @ 1.70201.0' requirements for your system 'linux_i686'

See also:

Reply to self - solved by adding this line to the [env...] section:

platform_packages = platformio/toolchain-gccarmnoneeabi@1.90201.191206

IOW, it was just a matter of going through the install options and finding a newer build for x86!

The depth and flexibility of PlatformIO is truly amazing!