From c8752b428dc11db98f2ccd16d2e4239dd731f992 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Thu, 11 Mar 2010 19:14:33 +0000 Subject: Rearrange libraries linking order to work with --as-needed linker option. If the linker uses the --as-needed option linking failed due to the order of the libraries on the command line. Arch Linux seems to default to this option, and the Gentoo documentation mentiones it as experimental feature. Changing the library order fixes the link issue. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25124 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/rbutilqt.pro | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro index fc62e77241..0b03907a94 100644 --- a/rbutil/rbutilqt/rbutilqt.pro +++ b/rbutil/rbutilqt/rbutilqt.pro @@ -29,14 +29,6 @@ RBBASE_DIR = $$replace(RBBASE_DIR,/rbutil/rbutilqt,) message("Rockbox Base dir: "$$RBBASE_DIR) -# check for system speex. Add a custom rule for pre-building librbspeex if not -# found. Newer versions of speex are split up into libspeex and libspeexdsp, -# and some distributions package them separately. Check for both and fall back -# to librbspeex if not found. -LIBSPEEX = $$system(pkg-config --silence-errors --libs speex speexdsp) -!static:!isEmpty(LIBSPEEX) { - LIBS += $$LIBSPEEX -} # custom rules for rockbox-specific libs !mac { RBLIBPOSTFIX = .a @@ -187,6 +179,17 @@ DEPENDPATH = $$INCLUDEPATH LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lucl +# check for system speex. Add a custom rule for pre-building librbspeex if not +# found. Newer versions of speex are split up into libspeex and libspeexdsp, +# and some distributions package them separately. Check for both and fall back +# to librbspeex if not found. +# NOTE: keep this after -lrbspeex, otherwise linker errors occur if the linker +# defaults to --as-needed (see http://www.gentoo.org/proj/en/qa/asneeded.xml) +LIBSPEEX = $$system(pkg-config --silence-errors --libs speex speexdsp) +!static:!isEmpty(LIBSPEEX) { + LIBS += $$LIBSPEEX +} + TEMPLATE = app dbg { CONFIG += debug thread qt warn_on -- cgit v1.2.3