OLD | NEW |
(Empty) | |
| 1 #!/bin/sh |
| 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 |
| 4 # found in the LICENSE file. |
| 5 |
| 6 # Reads etc/ld.so.conf.d/*.conf and returns the appropriate linker flags. |
| 7 # |
| 8 # sysroot_ld_path.sh /abspath/to/sysroot |
| 9 # |
| 10 |
| 11 if [ $# -ne 1 ]; then |
| 12 echo $0 /abspath/to/sysroot |
| 13 exit 1 |
| 14 fi |
| 15 |
| 16 echo $1 | grep -qs ' ' |
| 17 if [ $? -eq 0 ]; then |
| 18 echo $1 contains whitespace. |
| 19 exit 1 |
| 20 fi |
| 21 |
| 22 for entry in $(cat $1/etc/ld.so.conf.d/*.conf | grep ^/) |
| 23 do |
| 24 entry=$1$entry |
| 25 echo -L$entry |
| 26 echo -Wl,-rpath-link=$entry |
| 27 done | xargs echo |
OLD | NEW |