Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Unified Diff: SConstruct

Issue 549079: Support for MIPS in architecture independent files.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/SConscript » ('j') | src/allocation.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: SConstruct
===================================================================
--- SConstruct (revision 3220)
+++ SConstruct (working copy)
@@ -173,6 +173,19 @@
'CCFLAGS': ['-m32'],
'LINKFLAGS': ['-m32']
},
+ 'arch:mips': {
Søren Thygesen Gjesse 2010/01/20 15:30:28 If you change this section to 'CPPDEFINES':
Alexandre 2010/01/22 23:08:42 Applied this change. On 2010/01/20 15:30:28, Søren
+ 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'],
+ 'CCFLAGS': ['-EL', '-mips32r2', '-Wa,-mips32r2', '-fno-inline'],
+ 'LDFLAGS': ['-EL']
+ },
+ 'simulator:mips': {
+ 'CCFLAGS': ['-m32'],
+ 'LINKFLAGS': ['-m32']
+ },
+ 'arch:mips-simu': {
Søren Thygesen Gjesse 2010/01/20 15:30:28 With the change to arch:mips above the pseudo arch
Alexandre 2010/01/22 23:08:42 mips-simu arch removed On 2010/01/20 15:30:28, Sør
+ 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS', 'NO_NATIVES', 'MIPS_SIMU'],
+ 'CCFLAGS': [],
+ },
'arch:x64': {
'CPPDEFINES': ['V8_TARGET_ARCH_X64'],
'CCFLAGS': ['-m64'],
@@ -281,6 +294,12 @@
# used by the arm simulator.
'WARNINGFLAGS': ['/wd4996']
},
+ 'arch:mips': {
+ 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'],
+ },
+ 'arch:mips-simu': {
Søren Thygesen Gjesse 2010/01/20 15:30:28 With the change to arch:mips above the pseudo arch
Alexandre 2010/01/22 23:08:42 mips-simu arch removed On 2010/01/20 15:30:28, Sør
+ 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS', 'NO_NATIVES', 'MIPS_SIMU'],
Søren Thygesen Gjesse 2010/01/20 15:30:28 There is no active use of defines NO_NATIVES and M
Alexandre 2010/01/22 23:08:42 Removed On 2010/01/20 15:30:28, Søren Gjesse wrote
+ },
'disassembler:on': {
'CPPDEFINES': ['ENABLE_DISASSEMBLER']
}
@@ -423,10 +442,24 @@
'CCFLAGS': ['-m64'],
'LINKFLAGS': ['-m64']
},
+ 'arch:mips': {
Søren Thygesen Gjesse 2010/01/20 15:30:28 Change this section like this: 'CPPDEFINES'
Alexandre 2010/01/22 23:08:42 Applied the changes. On 2010/01/20 15:30:28, Søren
+ 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'],
+ 'CCFLAGS': ['-EL', '-mips32r2', '-Wa,-mips32r2', '-fno-inline'],
+ 'LINKFLAGS': ['-EL'],
+ 'LDFLAGS': ['-EL']
+ },
+ 'arch:mips-simu': {
Søren Thygesen Gjesse 2010/01/20 15:30:28 With the change to arch:mips above the pseudo arch
Alexandre 2010/01/22 23:08:42 mips-simu arch removed On 2010/01/20 15:30:28, Sør
+ 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS', 'NO_NATIVES', 'MIPS_SIMU'],
+ 'CCFLAGS': [],
+ },
'simulator:arm': {
'CCFLAGS': ['-m32'],
'LINKFLAGS': ['-m32']
},
+ 'simulator:mips': {
+ 'CCFLAGS': ['-m32'],
+ 'LINKFLAGS': ['-m32']
+ },
'mode:release': {
'CCFLAGS': ['-O2']
},
@@ -560,7 +593,7 @@
'help': 'the os to build for (' + OS_GUESS + ')'
},
'arch': {
- 'values':['arm', 'ia32', 'x64'],
+ 'values':['arm', 'ia32', 'x64', 'mips'],
'default': ARCH_GUESS,
'help': 'the architecture to build for (' + ARCH_GUESS + ')'
},
@@ -610,7 +643,7 @@
'help': 'use Microsoft Visual C++ link-time code generation'
},
'simulator': {
- 'values': ['arm', 'none'],
+ 'values': ['arm', 'mips', 'none'],
'default': 'none',
'help': 'build with simulator'
},
@@ -758,6 +791,9 @@
self.AppendFlags(result, flags[toolchain].get('all'))
for option in sorted(self.options.keys()):
value = self.options[option]
+ # On MIPS the flags needed to compile for the HW board are not accepted by gcc
+ # when compiling for x86.
+ if (self.options['simulator'] == 'mips' and value == 'mips'): value = 'mips-simu'
Søren Thygesen Gjesse 2010/01/20 15:30:28 This seems wrong. It will overwrite both the value
Alexandre 2010/01/22 23:08:42 Removed. On 2010/01/20 15:30:28, Søren Gjesse wrot
self.AppendFlags(result, flags[toolchain].get(option + ':' + value))
self.AppendFlags(result, flags.get('all'))
return result
@@ -817,6 +853,10 @@
# Print a warning if arch has explicitly been set
print "Warning: forcing architecture to match simulator (%s)" % options['simulator']
options['arch'] = options['simulator']
+# # On MIPS we can't keep mips arch flags when building the emulator
+# if (options['simulator'] == 'mips-simu')
+# print "Warning: Don't pay attention to the previous warning. (building mips simulator)"
+# options['arch'] = 'mips'
Søren Thygesen Gjesse 2010/01/20 15:30:28 Chis change should not be needed when the pseudo a
Alexandre 2010/01/22 23:08:42 Removed. On 2010/01/20 15:30:28, Søren Gjesse wrot
if (options['prof'] != 'off') and (options['profilingsupport'] == 'off'):
# Print a warning if profiling is enabled without profiling support
print "Warning: forcing profilingsupport on when prof is on"
« no previous file with comments | « no previous file | src/SConscript » ('j') | src/allocation.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698