summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpetarj@mips.com <petarj@mips.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-20 14:53:25 +0000
committerpetarj@mips.com <petarj@mips.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-20 14:53:25 +0000
commitd5ca5ae99620e4a47a35dfbbc90bacb47dd2da92 (patch)
tree31d76995961f5ea2ce680921b8c93c996675ea4f
parent16b081091c6034b2c2d3dfbb47b4a464abb9ec60 (diff)
downloadchromium_src-d5ca5ae99620e4a47a35dfbbc90bacb47dd2da92.zip
chromium_src-d5ca5ae99620e4a47a35dfbbc90bacb47dd2da92.tar.gz
chromium_src-d5ca5ae99620e4a47a35dfbbc90bacb47dd2da92.tar.bz2
linux: use correct libgcrypt-config paths when cross-compiling
Add a wrapper around libgcrypt-config to generate correct include and library paths when cross-compiling using a sysroot. BUG= Linux build with sysroot will fail TEST= Build Linux Chromium for MIPS Review URL: https://codereview.chromium.org/204553003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258293 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xbuild/linux/libgcrypt-config-wrapper17
-rw-r--r--build/linux/system.gyp8
2 files changed, 22 insertions, 3 deletions
diff --git a/build/linux/libgcrypt-config-wrapper b/build/linux/libgcrypt-config-wrapper
new file mode 100755
index 0000000..48a2a8e
--- /dev/null
+++ b/build/linux/libgcrypt-config-wrapper
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# This program wraps around libgcrypt-config to generate the correct include and
+# library paths when cross-compiling using a sysroot.
+
+sysroot="$1"
+shift
+
+if [ -z "$sysroot" ]
+then
+ echo "usage: $0 /path/to/sysroot [libgcrypt-config-arguments]" >&2
+ exit 1
+fi
+
+config_path=$sysroot/usr/bin/libgcrypt-config
+set -e
+echo `$config_path "$@" | sed -e 's|/|'$sysroot'/|'`
diff --git a/build/linux/system.gyp b/build/linux/system.gyp
index 7911ae9..92db5ff 100644
--- a/build/linux/system.gyp
+++ b/build/linux/system.gyp
@@ -7,8 +7,10 @@
'conditions': [
['sysroot!=""', {
'pkg-config': '<(chroot_cmd) ./pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
+ 'libgcrypt-config': '<(chroot_cmd) ./libgcrypt-config-wrapper "<(sysroot)"',
}, {
- 'pkg-config': 'pkg-config'
+ 'pkg-config': 'pkg-config',
+ 'libgcrypt-config': 'libgcrypt-config',
}],
],
@@ -736,12 +738,12 @@
['_toolset=="target" and use_cups==1', {
'direct_dependent_settings': {
'cflags': [
- '<!@(libgcrypt-config --cflags)',
+ '<!@(<(libgcrypt-config) --cflags)',
],
},
'link_settings': {
'libraries': [
- '<!@(libgcrypt-config --libs)',
+ '<!@(<(libgcrypt-config) --libs)',
],
},
}],