https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99914
--- Comment #4 from Iain Buclaw <ibuclaw at gdcproject dot org> --- Weak declarations (both functions and variables) were found not to be working at all on MinGW targets. The only way that there desired behaviour can be achieved there then is to mark *all* declarations with external linkage as being DECL_ONE_ONLY, so they can override each other.