Commit a23d7141 authored by glider@chromium.org's avatar glider@chromium.org

Introduce the chroot_cmd flag that contains the command line prefix for...

Introduce the chroot_cmd flag that contains the command line prefix for running in a chrooted environment.

Right now when supplying a 32-bit sysroot via the 'sysroot' GYP flag on a 64-bit host arch,
pkg-config (and pkg-config-wrapper) fail to generate the correct 32-bit paths within that sysroot.
The solution is to chroot into that directory and run pkg-config from there.
This is intended to work with schroot scripts like 'precise32' generated when running build/install-chroot.sh

BUG=324207
R=piman@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251353 0039d316-1c4b-4281-b951-d872f2087c98
parent 2e92edfe
...@@ -287,6 +287,7 @@ ...@@ -287,6 +287,7 @@
# The system root for cross-compiles. Default: none. # The system root for cross-compiles. Default: none.
'sysroot%': '', 'sysroot%': '',
'chroot_cmd%': '',
# The system libdir used for this ABI. # The system libdir used for this ABI.
'system_libdir%': 'lib', 'system_libdir%': 'lib',
...@@ -913,6 +914,7 @@ ...@@ -913,6 +914,7 @@
'arm_neon%': '<(arm_neon)', 'arm_neon%': '<(arm_neon)',
'arm_neon_optional%': '<(arm_neon_optional)', 'arm_neon_optional%': '<(arm_neon_optional)',
'sysroot%': '<(sysroot)', 'sysroot%': '<(sysroot)',
'chroot_cmd%': '<(chroot_cmd)',
'system_libdir%': '<(system_libdir)', 'system_libdir%': '<(system_libdir)',
'component%': '<(component)', 'component%': '<(component)',
'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
'variables': { 'variables': {
'conditions': [ 'conditions': [
['sysroot!=""', { ['sysroot!=""', {
'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"', 'pkg-config': '<(chroot_cmd) ./pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
}, { }, {
'pkg-config': 'pkg-config' 'pkg-config': 'pkg-config'
}], }],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment