From 5ec5dcbd823eb15c59dce621914e080380d62da5 Mon Sep 17 00:00:00 2001 From: "iposva@chromium.org" Date: Thu, 16 Jul 2009 22:41:28 +0000 Subject: [PATCH] - Simplify the architecture setup. In particular the 'wordsize' parameter cannot be trusted. The reported host architecture has no relation to the default architecture being used for gcc. Review URL: http://codereview.chromium.org/149774 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- SConstruct | 75 +++++++++++++++--------------------------------------- 1 file changed, 20 insertions(+), 55 deletions(-) diff --git a/SConstruct b/SConstruct index 78b050d735..dbcd616862 100644 --- a/SConstruct +++ b/SConstruct @@ -149,31 +149,22 @@ LIBRARY_FLAGS = { '-Wstrict-aliasing=2'], 'CPPPATH': ANDROID_INCLUDES, }, - 'wordsize:32': { - 'arch:x64': { - 'CCFLAGS': ['-m64'], - 'LINKFLAGS': ['-m64'] - } - }, - 'wordsize:64': { - 'arch:ia32': { - 'CCFLAGS': ['-m32'], - 'LINKFLAGS': ['-m32'] - }, - 'arch:arm': { - 'CCFLAGS': ['-m32'], - 'LINKFLAGS': ['-m32'] - } - }, 'arch:ia32': { - 'CPPDEFINES': ['V8_TARGET_ARCH_IA32'] + 'CPPDEFINES': ['V8_TARGET_ARCH_IA32'], + 'CCFLAGS': ['-m32'], + 'LINKFLAGS': ['-m32'] }, 'arch:arm': { 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'] }, + 'simulator:arm': { + 'CCFLAGS': ['-m32'], + 'LINKFLAGS': ['-m32'] + }, 'arch:x64': { - 'CCFLAGS': ['-fno-strict-aliasing'], - 'CPPDEFINES': ['V8_TARGET_ARCH_X64'] + 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], + 'CCFLAGS': ['-fno-strict-aliasing', '-m64'], + 'LINKFLAGS': ['-m64'], }, 'prof:oprofile': { 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'] @@ -341,22 +332,6 @@ CCTEST_EXTRA_FLAGS = { 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG'] } }, - 'wordsize:32': { - 'arch:x64': { - 'CCFLAGS': ['-m64'], - 'LINKFLAGS': ['-m64'] - } - }, - 'wordsize:64': { - 'arch:ia32': { - 'CCFLAGS': ['-m32'], - 'LINKFLAGS': ['-m32'] - }, - 'arch:arm': { - 'CCFLAGS': ['-m32'], - 'LINKFLAGS': ['-m32'] - } - } }, 'msvc': { 'all': { @@ -408,21 +383,17 @@ SAMPLE_FLAGS = { 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG'] } }, - 'wordsize:32': { - 'arch:x64': { - 'CCFLAGS': ['-m64'], - 'LINKFLAGS': ['-m64'] - } + 'arch:ia32': { + 'CCFLAGS': ['-m32'], + 'LINKFLAGS': ['-m32'] }, - 'wordsize:64': { - 'arch:ia32': { - 'CCFLAGS': ['-m32'], - 'LINKFLAGS': ['-m32'] - }, - 'arch:arm': { - 'CCFLAGS': ['-m32'], - 'LINKFLAGS': ['-m32'] - } + 'arch:x64': { + 'CCFLAGS': ['-m64'], + 'LINKFLAGS': ['-m64'] + }, + 'simulator:arm': { + 'CCFLAGS': ['-m32'], + 'LINKFLAGS': ['-m32'] }, 'mode:release': { 'CCFLAGS': ['-O2'] @@ -533,7 +504,6 @@ def GuessToolchain(os): OS_GUESS = utils.GuessOS() TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS) ARCH_GUESS = utils.GuessArchitecture() -WORDSIZE_GUESS = utils.GuessWordsize() SIMPLE_OPTIONS = { @@ -587,11 +557,6 @@ SIMPLE_OPTIONS = { 'default': 'on', 'help': 'use Microsoft Visual C++ link-time code generation' }, - 'wordsize': { - 'values': ['64', '32'], - 'default': WORDSIZE_GUESS, - 'help': 'the word size' - }, 'simulator': { 'values': ['arm', 'none'], 'default': 'none',