From b98f8fe48f6ded8a0bf29b8dc6d72ce0eaffed46 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 23 Nov 2010 21:35:10 +0100 Subject: scripts/xldd: stop at first match Break the library search loop as soon as a match is found. Previously, if a library was present in different places, then the last occurence would be returned, when the first one would have been used at runtime. Signed-off-by: "Yann E. MORIN" diff --git a/scripts/xldd.in b/scripts/xldd.in index 0c88f93..30077ad 100755 --- a/scripts/xldd.in +++ b/scripts/xldd.in @@ -170,12 +170,14 @@ do_find_needed() { for d in "${needed_search_path[@]}"; do if [ -f "${root}${d}/${needed}" ]; then found="${d}/${needed}" + break fi done if [ -z "${found}" ]; then for d in "${needed_search_path[@]}"; do if [ -f "${sysroot}${d}/${needed}" ]; then found_sysroot="${d}/${needed}" + break fi done fi -- cgit v0.10.2-6-g49f6