mariadb fails to link libmysqlclient.so when compiling with GNU gold as the linker. Reproducible: Always Steps to Reproduce: binutils-config --linker ld.gold emerge mariadb Actual Results: Linking CXX shared library libmysqlclient.so cd /var/tmp/portage/dev-db/mariadb-5.5.37/work/mariadb-5.5.37_build/libmysql && /usr/bin/cmake -E cmake_link_script CMakeFiles/libmysql.dir/link.txt --verbose=1 /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -Wall -O2 -pipe -fno-strict-aliasing -felide-constructors -fno-implicit-templates -fno-exceptions -fno-rtti -fno-strict-aliasing -Wno-unused-parameter -fno-implicit-templates -fno-exceptions -fno-rtti -DNDEBUG -DDBUG_OFF -Wl,--no-undefined -Wl,--no-undefined -Wl,/var/tmp/portage/dev-db/mariadb-5.5.37/work/mariadb-5.5.37_build/libmysql/libmysql_versions.ld -Wl,-O1 -Wl,--as-needed -shared -Wl,-soname,libmysqlclient.so.18 -o libmysqlclient.so.18.0.0 CMakeFiles/libmysql.dir/libmysql_exports_file.cc.o -lpthread libclientlib.a ../dbug/libdbug.a ../strings/libstrings.a ../vio/libvio.a ../mysys/libmysys.a -lz -lssl -lcrypto -lcrypto -ldl ../dbug/libdbug.a ../mysys/libmysys.a ../strings/libstrings.a -lz -lm -lpthread /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: /var/tmp/portage/dev-db/mariadb-5.5.37/work/mariadb-5.5.37_build/libmysql/libmysql_versions.ld:156:9: invalid use of VERSION in input file
Created attachment 375738 [details] build.log
Created attachment 375740 [details] emerge --info
Listed upstream as MDEV-5982
Have the same issue with dev-db/mariadb-10.0.12 as well.
*** Bug 523932 has been marked as a duplicate of this bug. ***
*** Bug 538252 has been marked as a duplicate of this bug. ***
+ 17 Mar 2015; <grknight@gentoo.org> mysql-multilib.eclass: + Move flag modifications to apply once for all ABIs; Use tc-ld-disable-gold + for bug 508724; Move tokudb check to pkg_pretend Forced to use ld.bfd per above commit since upstream cannot come to a solution.