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>
require eglibc.inc
-PR = "r1"
+PR = "r2"
DEPENDS += "gperf-native kconfig-frontends-native"
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
}