summaryrefslogtreecommitdiff
path: root/src/SConscript
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-01-27 01:59:20 -0500
committerGabe Black <gblack@eecs.umich.edu>2007-01-27 01:59:20 -0500
commit0358ccee23072eef0b6448e3170457037682a452 (patch)
tree378b5ba325d74536092a7f245423d81274db38b4 /src/SConscript
parente41f54f97f9ebdea32cc6498c346636cddc9e06d (diff)
parent5c7bf74c073d0aea808046d10dfcaa6c319217a3 (diff)
downloadgem5-0358ccee23072eef0b6448e3170457037682a452.tar.xz
Merge zizzer:/bk/newmem
into zower.eecs.umich.edu:/eecshome/m5/newmem src/arch/sparc/isa/formats/mem/util.isa: src/arch/sparc/isa_traits.hh: src/arch/sparc/system.cc: Hand Merge --HG-- extra : convert_revision : d5e0c97caebb616493e2f642e915969d7028109c
Diffstat (limited to 'src/SConscript')
-rw-r--r--src/SConscript29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/SConscript b/src/SConscript
index a998dd561..6c179f861 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -311,30 +311,41 @@ def makeEnv(label, objsfx, strip = False, **kwargs):
envList.append(newEnv)
# Debug binary
-# Solaris seems to have some issue with DWARF2 debugging information, it's ok
-# with stabs though
-if sys.platform == 'sunos5':
- debug_flag = '-gstabs+'
+ccflags = {}
+if env['GCC']:
+ if sys.platform == 'sunos5':
+ ccflags['debug'] = '-gstabs+'
+ else:
+ ccflags['debug'] = '-ggdb3'
+ ccflags['opt'] = '-g -O3'
+ ccflags['fast'] = '-O3'
+ ccflags['prof'] = '-O3 -g -pg'
+elif env['SUNCC']:
+ ccflags['debug'] = '-g0'
+ ccflags['opt'] = '-g -O'
+ ccflags['fast'] = '-fast'
+ ccflags['prof'] = '-fast -g -pg'
else:
- debug_flag = '-ggdb3'
+ print 'Unknown compiler, please fix compiler options'
+ Exit(1)
makeEnv('debug', '.do',
- CCFLAGS = Split('%s -O0' % debug_flag),
+ CCFLAGS = Split(ccflags['debug']),
CPPDEFINES = ['DEBUG', 'TRACING_ON=1'])
# Optimized binary
makeEnv('opt', '.o',
- CCFLAGS = Split('-g -O3'),
+ CCFLAGS = Split(ccflags['opt']),
CPPDEFINES = ['TRACING_ON=1'])
# "Fast" binary
makeEnv('fast', '.fo', strip = True,
- CCFLAGS = Split('-O3'),
+ CCFLAGS = Split(ccflags['fast']),
CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'])
# Profiled binary
makeEnv('prof', '.po',
- CCFLAGS = Split('-O3 -g -pg'),
+ CCFLAGS = Split(ccflags['prof']),
CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'],
LINKFLAGS = '-pg')