From owner-freebsd-ports@FreeBSD.ORG Sun Apr 10 22:07:38 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5423916A4CE for ; Sun, 10 Apr 2005 22:07:38 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0242443D2F for ; Sun, 10 Apr 2005 22:07:38 +0000 (GMT) (envelope-from freebsd-ports@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DKkXk-0002tm-91 for freebsd-ports@freebsd.org; Mon, 11 Apr 2005 00:04:36 +0200 Received: from kvip88.kvi.nl ([129.125.15.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Apr 2005 00:04:36 +0200 Received: from A.S.Usov by kvip88.kvi.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Apr 2005 00:04:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-ports@freebsd.org From: "Alexander S. Usov" Date: Mon, 11 Apr 2005 00:06:58 +0200 Organization: KVI Lines: 27 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: kvip88.kvi.nl User-Agent: KNode/0.9.0 Sender: news Subject: Using -as-needed in KDE X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2005 22:07:38 -0000 Hi! Recently I found somewhat strange patch to Mk/bsd.kde.mk : Revision 1.47 Globally disable -Wl,-as-needed for all users of USE_KDELIBS_VER. Binaries linked with -pthread and -Wl,as-needed will have all references to libphthread stripped (reason/reasoning unknown), causing funny runtime errors when Qt decides to fire up a thread. Which I find somewhat strange, as I believe that there were reports of a quite measurable increase in start-up time for KDE applications due to the use of "-as-needed" linking flag. As far as I can see there are at least two ways to work around the issue described above. The brute-force and dirty solution is to add something like "-noas-needed -lptread -as-needed" to LDFLAGS. In a more cleaner way, as it is libqt-mt who needs threading in the first place, why not link it against libpthread? Additionally this should solve the problems with qtk-qt-engine, which fails to load now for non-threaded applications. -- Best regards, Alexander.