--- libgomp/configure.tgt.orig 2020-03-04 19:30:03.000000000 +1100 +++ libgomp/configure.tgt 2020-09-09 22:10:31.537181000 +1000 @@ -140,6 +140,11 @@ config_path="bsd darwin posix" ;; + *-*-bsdsunix*) + # Need to link with -lpthread so libgomp.so is self-contained. + XLDFLAGS="${XLDFLAGS} -lpthread" + ;; + *-*-freebsd*) # Need to link with -lpthread so libgomp.so is self-contained. XLDFLAGS="${XLDFLAGS} -lpthread"