Teensy 4.0 not compiling on Raspberry pi, bits/c++config.h: No such file or directory

Yes this indeed exists on the 5.4.1 compiler for my Windows system

I’ve uploaded the file at libarm_cortexM7lfsp_math.a - Google Drive.

Try copying it to /home/pi/.platformio/packages/toolchain-gccarmnoneeabi@src-f2672645aa87274590eadcfd21f3d135/arm-none-eabi/lib and retry compilation.