From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jun 2 17:50:05 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF9131065673 for ; Wed, 2 Jun 2010 17:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B5BB38FC26 for ; Wed, 2 Jun 2010 17:50:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o52Ho5pf063279 for ; Wed, 2 Jun 2010 17:50:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o52Ho50t063278; Wed, 2 Jun 2010 17:50:05 GMT (envelope-from gnats) Date: Wed, 2 Jun 2010 17:50:05 GMT Message-Id: <201006021750.o52Ho50t063278@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Anonymous Cc: Subject: Re: ports/146979: editors/emacs configuration ignores "-D WITHOUT_X11" X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Anonymous List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jun 2010 17:50:06 -0000 The following reply was made to PR ports/146979; it has been noted by GNATS. From: Anonymous To: wahjava@gmail.com (Ashish SHUKLA) Cc: keramida@freebsd.org (Giorgos Keramidas), Paul Hoffman , bug-followup@freebsd.org Subject: Re: ports/146979: editors/emacs configuration ignores "-D WITHOUT_X11" Date: Wed, 02 Jun 2010 17:42:58 +0000 wahjava@gmail.com (Ashish SHUKLA) writes: >> Note: -lpthread is only present when -nostdilb is *not* specified. > > So the problem is the exclusion of 'pthread_*' routines from '-lgcc -lgcc_s' > of GCC 3.4 (or whatever version ships with 6.x) and GCC 4.5 ? or is it > exclusion of those routines from 'libc' of 9.x and 6.x ? No. -nostdlib cancels implicit -lpthread from -pthread option. So, -lpthread should be specified explicitly. It just doesn't link against threading library otherwise. --- dbus_pthread.diff begins here --- Explicitly link against -lpthread only if dbus has -pthread in ldflags. Command line bit stolen from Mk/bsd.gecko.mk. Index: editors/emacs/Makefile =================================================================== RCS file: /a/.cvsup/ports/editors/emacs/Makefile,v retrieving revision 1.96 diff -u -p -r1.96 Makefile --- editors/emacs/Makefile 31 May 2010 01:58:29 -0000 1.96 +++ editors/emacs/Makefile 2 Jun 2010 17:20:19 -0000 @@ -68,6 +68,8 @@ .include +DBUS_PTHREAD_LIBS!=${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 's|^.*%{\!pg: %{pthread:|| ; s|}.*$$||' || ${TRUE} + .if defined(WITHOUT_X11) CONFIGURE_ARGS+= --without-x .else @@ -213,14 +212,13 @@ PLIST_SUB+= SOURCES="" BROKEN= Emacs 23.X does not currently build on ia64 .endif -.if ${OSVERSION} < 700000 && defined(WITHOUT_X11) && defined(WITH_DBUS) -BROKEN= Does not currently build with dbus support but without X11 -.endif - post-patch: @${RM} -f ${WRKSRC}/info/* @${REINPLACE_CMD} -e "s/%%EMACS_VER%%/${EMACS_VER}/g" -e "s/%%DATADIR%%/${DATADIR:C/\//\\\//g}/g" ${WRKSRC}/sources.el +post-configure: + @${REINPLACE_CMD} -e '/^DBUS_LIBS/s/-pthread/& ${DBUS_PTHREAD_LIBS}/' ${WRKSRC}/src/Makefile + .if defined(WITH_SOURCES) post-install: @${MKDIR} ${DATADIR}/${EMACS_VER}/src --- dbus_pthread.diff ends here ---