Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Commit

Permalink
Update configure
Browse files Browse the repository at this point in the history
After running './configure' on s390x architecture VM, I was getting following output:

bash-4.3# uname -rvmpio
3.10.0-229.1.2.el7.s390x #1 SMP Fri Mar 6 17:14:40 EST 2015 s390x s390x s390x GNU/Linux

bash-4.3# ./configure
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'clang': 0,
                 'gcc_version': 49,
                 'host_arch': 's390',
                 'node_byteorder': 'big',
                 'node_install_npm': 'true',
                 'node_prefix': '',
                 'node_shared_cares': 'false',
                 'node_shared_http_parser': 'false',
                 'node_shared_libuv': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_tag': '',
                 'node_unsafe_optimizations': 0,
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'node_use_systemtap': 'false',
                 'openssl_no_asm': 0,
                 'python': '/usr/bin/python',
                 'target_arch': 's390',
                 'v8_enable_gdbjit': 0,
                 'v8_no_strict_aliasing': 1,
                 'v8_use_snapshot': 'true',
                 'want_separate_host_toolset': 0}}
creating  ./config.gypi
creating  ./config.mk
bash-4.3#

As we could see, the configure script has returned me incorrect architecture i.e. 's390' instead of 's390x'. I got this behavior for Fedora21, RHEL7, SLES12 and MCP8 OS. This causes 'make' fail as it tries to build for 's390' instead on 's390x'.

I am proposing the mentioned changes for fixing the issue.

Below is the output when I run the updated './configure' script:

bash-4.3# ./configure
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'clang': 0,
                 'gcc_version': 49,
                 'host_arch': 's390x',
                 'node_byteorder': 'big',
                 'node_install_npm': 'true',
                 'node_prefix': '',
                 'node_shared_cares': 'false',
                 'node_shared_http_parser': 'false',
                 'node_shared_libuv': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_tag': '',
                 'node_unsafe_optimizations': 0,
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'node_use_systemtap': 'false',
                 'openssl_no_asm': 0,
                 'python': '/usr/bin/python',
                 'target_arch': 's390x',
                 'v8_enable_gdbjit': 0,
                 'v8_no_strict_aliasing': 1,
                 'v8_use_snapshot': 'true',
                 'want_separate_host_toolset': 0}}
creating  ./config.gypi
creating  ./config.mk
bash-4.3#

Now it correctly identifies the host architecture for s390x.

Thanks.
Conflicts:
	configure
  • Loading branch information
shahidhs authored and richardlau committed Jun 23, 2015
1 parent 9eb1df2 commit 6965707
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import subprocess
import sys
import shutil
import string
import platform

CC = os.environ.get('CC', 'cc')

Expand Down Expand Up @@ -460,6 +461,7 @@ def host_arch_cc():
rtn = matchup[i]
break

rtn = platform.machine()
return rtn


Expand Down

0 comments on commit 6965707

Please sign in to comment.