https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118981
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- "-march=native -O2" is not normally used when compiling libstdc++. You must have some env variables set. Can you provide the output of `env` too?