https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78529
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Unless you do something very nasty in the spec files (in which case you should just avoid those tests), the user specified objects should always appear before stuff coming from -lc unless -lc is specified first on the command line.