]> code.ossystems Code Review - openembedded-core.git/commitdiff
eglibc: don't list the same path twice in RTLDLIST
authorBogdan Marinescu <bogdan.a.marinescu@intel.com>
Wed, 30 Jan 2013 16:26:40 +0000 (18:26 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Feb 2013 15:53:30 +0000 (15:53 +0000)
Before modifying RTLDLIST in ldd, make sure that it doesn't already
contain the right path, thus avoiding duplicate entries in RTLDLIST.

[YOCTO #2655]

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-core/eglibc/eglibc_2.17.bb

index c1cae4f2140dc8d0e06ef5fdbf8ecfe30cfc9ab4..7bdb267eb1d123a24e107fe725eadfdffc41d3f8 100644 (file)
@@ -1,6 +1,6 @@
 require eglibc.inc
 
-PR = "r1"
+PR = "r2"
 
 DEPENDS += "gperf-native kconfig-frontends-native"
 
@@ -143,8 +143,11 @@ do_compile () {
        echo "Adjust ldd script"
        if [ -n "${RTLDLIST}" ]
        then
-               sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)"\(.*\)"$#\1\2#'
-               sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)\(.*\)$#\1"${RTLDLIST} \2"#'
+               prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST=\(.*\)$#\1#'`
+               if [ "${prevrtld}" != "${RTLDLIST}" ]
+               then
+                       sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
+               fi
        fi
 
 }