https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109389
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Firstly, this is a proeprty of your linker, which is not part of GCC. GCC just passes the arguments to the linker in the order you give them. Secondly, this is not a bug, it's the expected behaviour for the linker. https://c-faq.com/lib/libsearch.html