summaryrefslogtreecommitdiffstats
path: root/build/linux
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-19 00:52:16 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-19 00:52:16 +0000
commit87d4e28f6f96d8efdeadd8e16a0f8ff2e5c080d2 (patch)
tree8e9d347c06c84cf2964210fbe9b4d05ed050d73a /build/linux
parentc579317dce3a89cf83f355b7082bac80025cfa4e (diff)
downloadchromium_src-87d4e28f6f96d8efdeadd8e16a0f8ff2e5c080d2.zip
chromium_src-87d4e28f6f96d8efdeadd8e16a0f8ff2e5c080d2.tar.gz
chromium_src-87d4e28f6f96d8efdeadd8e16a0f8ff2e5c080d2.tar.bz2
Add library paths and rlink-paths for directories in the sysroot.
NOTRY=true TEST=Cross compiling with ld.bfd works. Review URL: https://chromiumcodereview.appspot.com/12674012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188895 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/linux')
-rwxr-xr-xbuild/linux/sysroot_ld_path.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/build/linux/sysroot_ld_path.sh b/build/linux/sysroot_ld_path.sh
new file mode 100755
index 0000000..2cc5ade
--- /dev/null
+++ b/build/linux/sysroot_ld_path.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Reads etc/ld.so.conf.d/*.conf and returns the appropriate linker flags.
+#
+# sysroot_ld_path.sh /abspath/to/sysroot
+#
+
+if [ $# -ne 1 ]; then
+ echo $0 /abspath/to/sysroot
+ exit 1
+fi
+
+echo $1 | grep -qs ' '
+if [ $? -eq 0 ]; then
+ echo $1 contains whitespace.
+ exit 1
+fi
+
+for entry in $(cat $1/etc/ld.so.conf.d/*.conf | grep ^/)
+do
+ entry=$1$entry
+ echo -L$entry
+ echo -Wl,-rpath-link=$entry
+done | xargs echo