From owner-freebsd-ports@FreeBSD.ORG Sun Apr 10 22:43:44 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 634B316A4CE for ; Sun, 10 Apr 2005 22:43:44 +0000 (GMT) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 32D9C43D49 for ; Sun, 10 Apr 2005 22:43:43 +0000 (GMT) (envelope-from michaelnottebrock@gmx.net) Received: (qmail invoked by alias); 10 Apr 2005 22:43:40 -0000 Received: from p508BF99D.dip.t-dialin.net (EHLO lofi.dyndns.org) [80.139.249.157] by mail.gmx.net (mp026) with SMTP; 11 Apr 2005 00:43:40 +0200 X-Authenticated: #443188 Received: from kiste.my.domain (lofi@kiste.my.domain [192.168.8.4]) (authenticated bits=0) by lofi.dyndns.org (8.13.3/8.12.10) with ESMTP id j3AMhX4D083901 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Mon, 11 Apr 2005 00:43:34 +0200 (CEST) (envelope-from michaelnottebrock@gmx.net) From: Michael Nottebrock To: freebsd-ports@freebsd.org Date: Mon, 11 Apr 2005 00:43:25 +0200 User-Agent: KMail/1.8 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1149144.NDShI6nofN"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200504110043.30666.michaelnottebrock@gmx.net> X-Virus-Scanned: by amavisd-new X-Y-GMX-Trusted: 0 cc: "Alexander S. Usov" Subject: Re: 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:43:44 -0000 --nextPart1149144.NDShI6nofN Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday, 11. April 2005 00:06, Alexander S. Usov wrote: > 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. Exaggerated. > 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. No, that doesn't work. > In a more cleaner way, as it is libqt-mt who needs threading in the > first place, why not link it against libpthread? Because we don't do that in FreeBSD, see below. > Additionally this=20 > should solve the problems with qtk-qt-engine, which fails to load > now for non-threaded applications. And it would cause other problems elsewhere, which is why the decision was= =20 made during the development of 5-CURRENT to globally go with -pthread and=20 resolve pthread symbols not through libraries but through executables only. You can work around the problems with gtk-qt-engine by running the affected= =20 programs with something like env LD_PRELOAD=3D/usr/lib/libpthread.so.1=20 . =2D-=20 ,_, | Michael Nottebrock | lofi@freebsd.org (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org --nextPart1149144.NDShI6nofN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBCWawSXhc68WspdLARAmi5AJ47y0v/wd20pGqqHK4RCtnf3ZrqfQCgoabB 4g+5H8XYopwlE2sfdTdiFS4= =JqcO -----END PGP SIGNATURE----- --nextPart1149144.NDShI6nofN--