Commit 2ec0f32a authored by michael_dawson's avatar michael_dawson Committed by Commit bot

Fix host_arch detection for AIX and one new warning as error

The value returned on AIX for platform.machine() is not the
best value to map the architecture from.  Use platform.system
to determine if we are on AIX and if so set host_arch to
ppc64 as AIX 6.1 (the earliest supported) only provides a
64 bit kernel

AIX was reporting warning that offset may be used uninitialized

	modified:   build/detect_v8_host_arch.py
	modified:   build/standalone.gypi
	modified:   src/hydrogen-bce.cc

R=mbrandy@us.ibm.com, jkummerow@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27463}
parent a854cd19
......@@ -41,6 +41,7 @@ def DoMain(_):
"""Hook to be called from gyp without starting a separate python
interpreter."""
host_arch = platform.machine()
host_system = platform.system();
# Convert machine type to format recognized by gyp.
if re.match(r'i.86', host_arch) or host_arch == 'i86pc':
......@@ -56,6 +57,13 @@ def DoMain(_):
elif host_arch.startswith('mips'):
host_arch = 'mipsel'
# Under AIX the value returned by platform.machine is not
# the best indicator of the host architecture
# AIX 6.1 which is the lowest level supported only provides
# a 64 bit kernel
if host_system == 'AIX':
host_arch = 'ppc64'
# platform.machine is based on running kernel. It's possible to use 64-bit
# kernel with 32-bit userland, e.g. to give linker slightly more memory.
# Distinguish between different userland bitness by querying
......
......@@ -341,7 +341,7 @@
'cflags_cc': [ '-Wnon-virtual-dtor', '-fno-rtti', '-std=gnu++0x' ],
'ldflags': [ '-pthread', ],
'conditions': [
[ 'host_arch=="ppc64"', {
[ 'host_arch=="ppc64" and OS!="aix"', {
'cflags': [ '-mminimal-toc' ],
}],
[ 'visibility=="hidden" and v8_enable_backtrace==0', {
......
......@@ -380,7 +380,7 @@ BoundsCheckBbData* HBoundsCheckEliminationPhase::PreProcessBlock(
if (!i->IsBoundsCheck()) continue;
HBoundsCheck* check = HBoundsCheck::cast(i);
int32_t offset;
int32_t offset = 0;
BoundsCheckKey* key =
BoundsCheckKey::Create(zone(), check, &offset);
if (key == NULL) continue;
......
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