alsa-utils: fix linking against host libc.so/libm.so
authorDenys Dmytriyenko <denis@denix.org>
Thu, 11 Jun 2009 23:58:32 +0000 (19:58 -0400)
committerDenys Dmytriyenko <denis@denix.org>
Mon, 15 Jun 2009 16:54:46 +0000 (12:54 -0400)
Caused by expecting ncurses library in /usr/lib.

For some people it's just a warning:
ld: warning: library search path "/usr/lib" is unsafe for cross-compilation
ld: skipping incompatible /usr/lib/libm.so when searching for -lm

And for some people it breaks the build:
ld: warning: library search path "/usr/lib" is unsafe for cross-compilation
/usr/lib/libm.so: file not recognized: File format not recognized

Signed-off-by: Denys Dmytriyenko <denis@denix.org>
recipes/alsa/alsa-utils_1.0.18.bb

index 2931545..40718b5 100644 (file)
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.alsa-project.org"
 SECTION = "console/utils"
 LICENSE = "GPL"
 DEPENDS = "alsa-lib ncurses"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
            file://alsa-utils-automake.patch;patch=1 \
@@ -20,6 +20,7 @@ inherit autotools
 do_configure_append() {
        for i in $(find ${S} -name Makefile) ; do
                sed -i -e s:/usr/include/ncurses:${STAGING_INCDIR}/ncurses:g $i
+               sed -i -e 's:-L/usr/lib -lncurses:-L${STAGING_LIBDIR} -lncurses:g' $i
        done
 }