When compiling threaded D code with gdc, gdc will automatically link in libc_r instead of libpthread. This is due to a check in autoconf that seems to be targeted at FreeBSD 4.x Fix: !DSPAM:2756,459a9cbd4853422919100!--q9Nur4cNDwqRXMVWv0fbMH3zTGyaRPmxH4dv0uTkSwv57VJD Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" diff -ruN gdc.bak/files/patch-gcc::d::phobos::configure gdc/files/patch-gcc::d::phobos::configure --- gdc.bak/files/patch-gcc::d::phobos::configure Wed Dec 31 19:00:00 1969 +++ gdc/files/patch-gcc::d::phobos::configure Tue Jan 2 12:37:28 2007 @@ -0,0 +1,11 @@ +--- gcc.orig/d/phobos/configure Tue Jan 2 10:12:52 2007 ++++ gcc/d/phobos/configure Tue Jan 2 10:12:24 2007 +@@ -5912,7 +5912,7 @@ + echo "$as_me:$LINENO: checking for thread library linker argument" >&5 + echo $ECHO_N "checking for thread library linker argument... $ECHO_C" >&6 + d_thread_lib=error +- for thrd_lib in "" -lc_r -lpthread -ldce; do ++ for thrd_lib in "" -lpthread -ldce -lc_r; do + d_savelibs=$LIBS + LIBS="$LIBS $thrd_lib" + How-To-Repeat: Compile D code with gdc that uses threads. ldd <resulting binary>
State Changed From-To: open->feedback Awaiting maintainers feedback
I checked this patch. This patch correct the problem that threads does not operate correctly with gdc. So, I approve. Please commit it. Thanks. :) P.S. After, I will update the GDC to 0.20.
Responsible Changed From-To: freebsd-ports-bugs->rafan Eat.
rafan 2007-01-06 07:24:08 UTC FreeBSD ports repository Modified files: lang/gdc Makefile Log: - Fix threading support, favor pthread Since this port supports 5.x and later, we don't need to consider the 4.x case (-lc_r). Moreover, gdc uses ld as linker when compiling D source files, so PTHREAD_LIBS is not applicable here. PR: ports/107437 Submitted by: Jason DiCioccio <jd at ods.org> Approved by: Masanori OZAWA <ozawa at ongs.co.jp> (maintainer) Revision Changes Path 1.24 +3 -2 ports/lang/gdc/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed Committed. Thanks!