https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106572
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >which blows up the command line for the compilation. You can use a response file and that won't blow up the command line at all. That is: g++ -Q --help=warnings | tail -n +2 | awk '{print $1}' | tr '\n' ' ' > cxxflags.opt g++ @cxxflags.opt ....