There are few issues that ld.gold is having with DragonFly libgcc_pic.a. This alternative variant is less strict when linking c++ projects.
5f76495 gcc50: Add alternative variant of pthread presence checking.
contrib/gcc-5.0/libgcc/gthr-posix.h | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
Upstream: gitweb.dragonflybsd.org