https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82736
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- First -Wl, options just pass directly to the linker. That means these options are linker options and not gcc options. The linker which are most likely using is the gnu linker, please this to them. But what I suspect this is not a bug and you would to use -static option to get the behavior you want.