forked from len0rd/rockbox
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
This commit is contained in:
parent
405f6e6dbc
commit
c8752b428d
1 changed files with 11 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue