Skip to content

Commit

Permalink
Fix sysroot_ld_path.sh to correctly process the included configs.
Browse files Browse the repository at this point in the history
The $included_files var contains a list of paths relative to the sysroot.
However calling `ls $included_files` gives us a list of paths relative to the host system root, which is obviously wrong. We need to do `ls $root$included_files` instead.

BUG=324207
R=thestig@chromium.org
CC=sl.ostapenko@samsung.com

Review URL: https://codereview.chromium.org/163103003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251356 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
glider@chromium.org committed Feb 14, 2014
1 parent c59b631 commit 767cbcc
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions build/linux/sysroot_ld_path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,19 @@ process_ld_so_conf() {
echo "$ENTRY" | grep -qs ^include
if [ $? -eq 0 ]; then
local included_files=$(echo "$ENTRY" | sed 's/^include //')
if ls $included_files >/dev/null 2>&1 ; then
for inc_file in $included_files; do
echo $inc_file | grep -qs ^/
if [ $? -eq 0 ]; then
process_ld_so_conf "$root" "$root$inc_file"
else
process_ld_so_conf "$root" "$(pwd)/$inc_file"
fi
done
echo "$included_files" | grep -qs ^/
if [ $? -eq 0 ]; then
if ls $root$included_files >/dev/null 2>&1 ; then
for inc_file in $root$included_files; do
process_ld_so_conf "$root" "$inc_file"
done
fi
else
if ls $(pwd)/$included_files >/dev/null 2>&1 ; then
for inc_file in $(pwd)/$included_files; do
process_ld_so_conf "$root" "$inc_file"
done
fi
fi
continue
fi
Expand Down

0 comments on commit 767cbcc

Please sign in to comment.