http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58995
--- Comment #1 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Tue, Nov 05, 2013 at 12:20:59AM +0000, kargl at gcc dot gnu.org wrote: > > bsupc++/.libs -lpthread -ldl -L/home/sgk/gcc/obj4x/./gcc > /home/sgk/gcc/obj4x/x86_64-unknown-freebsd10.0/libstdc++-v3/src/.libs/libstdc++.so > -lm -lc -lgcc_s /home/sgk/gcc/obj4x/./gcc/crtendS.o /usr/lib/crtn.o > -Wl,-soname -Wl,libcilkrts.so.5 -o .libs/libcilkrts.so.5 > /usr/bin/ld: cannot find -ldl > collect2: error: ld returned 1 exit status > gmake[2]: *** [libcilkrts.la] Error 1 > gmake[2]: Leaving directory > `/usr/home/sgk/gcc/obj4x/x86_64-unknown-freebsd10.0/libcilkrts' > gmake[1]: *** [all-target-libcilkrts] Error 2 > gmake[1]: Leaving directory `/usr/home/sgk/gcc/obj4x' > gmake: *** [all] Error 2 > > This is caused by the hardcoded reference to libdl. > > troutmask:sgk[319] grep ldl libcilkrts/Makefile.am > AM_LDFLAGS = -lpthread -ldl > libcilkrts_la_LDFLAGS += -lpthread -ldl > > Please fix. > For the moment, hand editing x86_64-unknown-freebsd10.0/libcilkrts/Makefile to remove the two offending -ldl allows the build to complete.