Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(458)

Side by Side Diff: build/linux/sysroot_ld_path.sh

Issue 163103003: Fix sysroot_ld_path.sh to correctly process the included configs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Reads etc/ld.so.conf and/or etc/ld.so.conf.d/*.conf and returns the 6 # Reads etc/ld.so.conf and/or etc/ld.so.conf.d/*.conf and returns the
7 # appropriate linker flags. 7 # appropriate linker flags.
8 # 8 #
9 # sysroot_ld_path.sh /abspath/to/sysroot 9 # sysroot_ld_path.sh /abspath/to/sysroot
10 # 10 #
(...skipping 28 matching lines...) Expand all
39 39
40 # ld.so.conf may include relative include paths. pushd is a bashism. 40 # ld.so.conf may include relative include paths. pushd is a bashism.
41 local saved_pwd=$(pwd) 41 local saved_pwd=$(pwd)
42 cd $(dirname "$ld_so_conf") 42 cd $(dirname "$ld_so_conf")
43 43
44 cat "$ld_so_conf" | \ 44 cat "$ld_so_conf" | \
45 while read ENTRY; do 45 while read ENTRY; do
46 echo "$ENTRY" | grep -qs ^include 46 echo "$ENTRY" | grep -qs ^include
47 if [ $? -eq 0 ]; then 47 if [ $? -eq 0 ]; then
48 local included_files=$(echo "$ENTRY" | sed 's/^include //') 48 local included_files=$(echo "$ENTRY" | sed 's/^include //')
49 if ls $included_files >/dev/null 2>&1 ; then 49 echo "$included_files" | grep -qs ^/
50 for inc_file in $included_files; do 50 if [ $? -eq 0 ]; then
51 echo $inc_file | grep -qs ^/ 51 for inc_file in $root$included_files; do
Lei Zhang 2014/02/13 10:53:54 Oh, we need to check and make sure $included_files
52 if [ $? -eq 0 ]; then 52 process_ld_so_conf "$root" "$inc_file"
53 process_ld_so_conf "$root" "$root$inc_file" 53 done
54 else 54 else
55 process_ld_so_conf "$root" "$(pwd)/$inc_file" 55 for inc_file in $(pwd)/$included_files; do
56 fi 56 process_ld_so_conf "$root" "$inc_file"
57 done 57 done
58 fi 58 fi
59 continue 59 continue
60 fi 60 fi
61 61
62 echo "$ENTRY" | grep -qs ^/ 62 echo "$ENTRY" | grep -qs ^/
63 if [ $? -eq 0 ]; then 63 if [ $? -eq 0 ]; then
64 process_entry "$root" "$ENTRY" 64 process_entry "$root" "$ENTRY"
65 fi 65 fi
66 done 66 done
(...skipping 20 matching lines...) Expand all
87 if [ -e "$LD_SO_CONF" ]; then 87 if [ -e "$LD_SO_CONF" ]; then
88 process_ld_so_conf "$1" "$LD_SO_CONF" | xargs echo 88 process_ld_so_conf "$1" "$LD_SO_CONF" | xargs echo
89 elif [ -e "$LD_SO_CONF_D" ]; then 89 elif [ -e "$LD_SO_CONF_D" ]; then
90 find "$LD_SO_CONF_D" -maxdepth 1 -name '*.conf' -print -quit > /dev/null 90 find "$LD_SO_CONF_D" -maxdepth 1 -name '*.conf' -print -quit > /dev/null
91 if [ $? -eq 0 ]; then 91 if [ $? -eq 0 ]; then
92 for entry in $LD_SO_CONF_D/*.conf; do 92 for entry in $LD_SO_CONF_D/*.conf; do
93 process_ld_so_conf "$1" "$entry" 93 process_ld_so_conf "$1" "$entry"
94 done | xargs echo 94 done | xargs echo
95 fi 95 fi
96 fi 96 fi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698