https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100945
Bug ID: 100945 Summary: Building gcc fails because mthumb\r unrecognized option Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: kclifford at tranaptic dot ca Target Milestone: --- I'm building gcc 11.1.0 with host=i686-w64-mingw32 build=x86_64-pc-cygwin config-ml.in parses the output of "arm-eabi-gcc --print-multi-lib". Because the build machine is cygwin it thinks the line end is \n but the host is mingw and the line end is \r\n so the building of $flags using sed leaves behind a \r which is interpreted as part of the resulting flag. In two places in config-ml.in I modified: flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'` to flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g' -e 's/\r//g'` which fixed the problem. As an additional note the same problem occurred on 10.2.0 but I didn't get to a fix on that version.