From ab4afecce824213631f9e499c1f936e2ef617725 Mon Sep 17 00:00:00 2001 From: xtraeme Date: Thu, 15 Apr 2004 01:49:41 +0000 Subject: Be sure libgthread is linked to libc_r, because -pthread does not work with libraries, fixes problems seen when building net/ORBit2 in FreeBSD (doesn't affect others systems). --- devel/glib2/Makefile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'devel/glib2') diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile index a803f29a051..6c6a89848b6 100644 --- a/devel/glib2/Makefile +++ b/devel/glib2/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.46 2004/04/06 07:15:53 jmmv Exp $ +# $NetBSD: Makefile,v 1.47 2004/04/15 01:49:41 xtraeme Exp $ DISTNAME= glib-2.4.0 PKGNAME= ${DISTNAME:S/glib/glib2/} @@ -39,6 +39,23 @@ CONFIGURE_ARGS.gnu-iconv= --with-libiconv=gnu # Avoid an ICE in gcc2 on sparc64 CONFIGURE_ENV+= F77=${FALSE} +.include "../../mk/bsd.prefs.mk" + +# FreeBSD fix for libgthread: +# Be sure libgthread is linked to the threaded library (libc_r), otherwise +# -pthread is added and this won't work with libraries, only executable +# binaries. + +.if ${OPSYS} == "FreeBSD" + +SUBST_CLASSES= thr +SUBST_STAGE.thr= post-patch +SUBST_FILES.thr= gthread/Makefile.in +SUBST_SED.thr= -e "s|@G_THREAD_LIBS_FOR_GTHREAD@|-Wc,-lc_r|g" +SUBST_MESSAGE.thr= "Fixing libgthread." + +.endif + .include "../../converters/libiconv/buildlink3.mk" .include "../../devel/gettext-lib/buildlink3.mk" .include "../../devel/pkgconfig/buildlink3.mk" -- cgit v1.2.3