SConscript (3970:d54945bab95d) SConscript (3980:9bcb2a2e9bb8)
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 297 unchanged lines hidden (view full) ---

306 stripped_bin = bin + '.stripped'
307 newEnv.Command(stripped_bin, bin, 'strip $SOURCE -o $TARGET')
308 bin = stripped_bin
309 targets = newEnv.Concat(exe, [bin, 'python/m5py.zip'])
310 newEnv.M5Binary = targets[0]
311 envList.append(newEnv)
312
313# Debug binary
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 297 unchanged lines hidden (view full) ---

306 stripped_bin = bin + '.stripped'
307 newEnv.Command(stripped_bin, bin, 'strip $SOURCE -o $TARGET')
308 bin = stripped_bin
309 targets = newEnv.Concat(exe, [bin, 'python/m5py.zip'])
310 newEnv.M5Binary = targets[0]
311 envList.append(newEnv)
312
313# Debug binary
314# Solaris seems to have some issue with DWARF2 debugging information, it's ok
315# with stabs though
316if sys.platform == 'sunos5':
317 debug_flag = '-gstabs+'
314ccflags = {}
315if env['GCC']:
316 if sys.platform == 'sunos5':
317 ccflags['debug'] = '-gstabs+'
318 else:
319 ccflags['debug'] = '-ggdb3'
320 ccflags['opt'] = '-g -O3'
321 ccflags['fast'] = '-O3'
322 ccflags['prof'] = '-O3 -g -pg'
323elif env['SUNCC']:
324 ccflags['debug'] = '-g0'
325 ccflags['opt'] = '-g -O'
326 ccflags['fast'] = '-fast'
327 ccflags['prof'] = '-fast -g -pg'
318else:
328else:
319 debug_flag = '-ggdb3'
329 print 'Unknown compiler, please fix compiler options'
330 Exit(1)
320
321makeEnv('debug', '.do',
331
332makeEnv('debug', '.do',
322 CCFLAGS = Split('%s -O0' % debug_flag),
333 CCFLAGS = Split(ccflags['debug']),
323 CPPDEFINES = ['DEBUG', 'TRACING_ON=1'])
324
325# Optimized binary
326makeEnv('opt', '.o',
334 CPPDEFINES = ['DEBUG', 'TRACING_ON=1'])
335
336# Optimized binary
337makeEnv('opt', '.o',
327 CCFLAGS = Split('-g -O3'),
338 CCFLAGS = Split(ccflags['opt']),
328 CPPDEFINES = ['TRACING_ON=1'])
329
330# "Fast" binary
331makeEnv('fast', '.fo', strip = True,
339 CPPDEFINES = ['TRACING_ON=1'])
340
341# "Fast" binary
342makeEnv('fast', '.fo', strip = True,
332 CCFLAGS = Split('-O3'),
343 CCFLAGS = Split(ccflags['fast']),
333 CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'])
334
335# Profiled binary
336makeEnv('prof', '.po',
344 CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'])
345
346# Profiled binary
347makeEnv('prof', '.po',
337 CCFLAGS = Split('-O3 -g -pg'),
348 CCFLAGS = Split(ccflags['prof']),
338 CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'],
339 LINKFLAGS = '-pg')
340
341Return('envList')
349 CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'],
350 LINKFLAGS = '-pg')
351
352Return('envList')