[kde-freebsd] [SVN Commit] branches/qt-5.5/QT/Mk

Raphael Kubo da Costa rakuco at FreeBSD.org
Sun Jan 17 02:31:29 UTC 2016


SVN commit 11818 by rakuco:

bsd.qt.mk: Pass --as-needed to the linker when building the Qt5 ports.

Qt (at least when used with qmake) has a tendency to overlink: some
libraries have dependencies on others in the mkspec configurations and the
latter are always passed to the linker even if they are not actually used.

For example, by default x11-toolkits/qt5-quickcontrols links against
qt5-network even though nothing in the code ever uses QtNetwork.

By passing --as-needed to the linker by default (which Debian, ArchLinux and
openSUSE also do) when building the Qt ports we do not have to declare a lot
of unnecessary dependencies in USE_QT5. This could arguably work for Qt4
too, but since it is maintenance mode it is better not to fix what is not
explicitly broken there.



 M  +9 -0      bsd.qt.mk  




More information about the kde-freebsd mailing list