Make gyp autodetection of host_arch work for 64-bit kernel and 32-bit userland

Before it would get confused and detect above situation as 64-bit, leading to build
failures. So far we've used explicit target_arch in buildbot configuration
as a workaround, but with recipes for simplicity it'd be better
if no such workaround was needed.

BUG=none
[email protected]

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248214 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/build/common.gypi b/build/common.gypi
index 48bda215..91cfd0bd 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -103,12 +103,7 @@
             ['OS=="win" or OS=="mac" or OS=="ios"', {
               'host_arch%': 'ia32',
             }, {
-              # This handles the Unix platforms for which there is some support.
-              # Anything else gets passed through, which probably won't work
-              # very well; such hosts should pass an explicit target_arch to
-              # gyp.
-              'host_arch%':
-                '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
+              'host_arch%': '<!(python <(DEPTH)/build/linux/detect_host_arch.py)',
             }],
 
             # Embedded implies ozone.