Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Apr 2005 00:06:58 +0200
From:      "Alexander S. Usov" <A.S.Usov@kvi.nl>
To:        freebsd-ports@freebsd.org
Subject:   Using -as-needed in KDE
Message-ID:  <d3c7sp$q5r$1@sea.gmane.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d3c7sp$q5r$1>