https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69839
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Likely a bug on the Gentoo side. The linker handles differently libraries specified on the command line and libraries that are needed by those shared libraries, but are not mentioned on the command line. See binutils documentation.