summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-03-11 19:14:33 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-03-11 19:14:33 +0000
commitc8752b428dc11db98f2ccd16d2e4239dd731f992 (patch)
tree03df32689d9bbadf60c377bf8fbc7b1238e82e74
parent405f6e6dbcfdd3f2b6923822106833b6270cdb52 (diff)
downloadrockbox-c8752b428dc11db98f2ccd16d2e4239dd731f992.tar.gz
rockbox-c8752b428dc11db98f2ccd16d2e4239dd731f992.tar.bz2
rockbox-c8752b428dc11db98f2ccd16d2e4239dd731f992.zip
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
-rw-r--r--rbutil/rbutilqt/rbutilqt.pro19
1 files 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