SConscript revision 2521
1955SN/A# -*- mode:python -*-
2955SN/A
31762SN/A# Copyright (c) 2004-2005 The Regents of The University of Michigan
4955SN/A# All rights reserved.
5955SN/A#
6955SN/A# Redistribution and use in source and binary forms, with or without
7955SN/A# modification, are permitted provided that the following conditions are
8955SN/A# met: redistributions of source code must retain the above copyright
9955SN/A# notice, this list of conditions and the following disclaimer;
10955SN/A# redistributions in binary form must reproduce the above copyright
11955SN/A# notice, this list of conditions and the following disclaimer in the
12955SN/A# documentation and/or other materials provided with the distribution;
13955SN/A# neither the name of the copyright holders nor the names of its
14955SN/A# contributors may be used to endorse or promote products derived from
15955SN/A# this software without specific prior written permission.
16955SN/A#
17955SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18955SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19955SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20955SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21955SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22955SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23955SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24955SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25955SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26955SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27955SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282665Ssaidi@eecs.umich.edu
294762Snate@binkert.orgimport os
30955SN/Aimport sys
315522Snate@binkert.orgfrom os.path import isdir
326143Snate@binkert.org
334762Snate@binkert.org# This file defines how to build a particular configuration of M5
345522Snate@binkert.org# based on variable settings in the 'env' build environment.
35955SN/A
365522Snate@binkert.org# Import build environment variable from SConstruct.
3711974Sgabeblack@google.comImport('env')
38955SN/A
395522Snate@binkert.org###################################################
404202Sbinkertn@umich.edu#
415742Snate@binkert.org# Define needed sources.
42955SN/A#
434381Sbinkertn@umich.edu###################################################
444381Sbinkertn@umich.edu
458334Snate@binkert.org# Base sources used by all configurations.
46955SN/A
47955SN/Abase_sources = Split('''
484202Sbinkertn@umich.edu	base/circlebuf.cc
49955SN/A	base/copyright.cc
504382Sbinkertn@umich.edu	base/cprintf.cc
514382Sbinkertn@umich.edu        base/embedfile.cc
524382Sbinkertn@umich.edu	base/fast_alloc.cc
536654Snate@binkert.org	base/fifo_buffer.cc
545517Snate@binkert.org	base/hostinfo.cc
558614Sgblack@eecs.umich.edu	base/hybrid_pred.cc
567674Snate@binkert.org	base/inifile.cc
576143Snate@binkert.org	base/intmath.cc
586143Snate@binkert.org	base/match.cc
596143Snate@binkert.org	base/misc.cc
608233Snate@binkert.org	base/output.cc
618233Snate@binkert.org	base/pollevent.cc
628233Snate@binkert.org	base/range.cc
638233Snate@binkert.org	base/random.cc
648233Snate@binkert.org	base/sat_counter.cc
658334Snate@binkert.org	base/socket.cc
668334Snate@binkert.org	base/statistics.cc
6710453SAndrew.Bardsley@arm.com	base/str.cc
6810453SAndrew.Bardsley@arm.com	base/time.cc
698233Snate@binkert.org	base/trace.cc
708233Snate@binkert.org	base/traceflags.cc
718233Snate@binkert.org	base/userinfo.cc
728233Snate@binkert.org	base/compression/lzss_compression.cc
738233Snate@binkert.org	base/loader/aout_object.cc
748233Snate@binkert.org	base/loader/ecoff_object.cc
7511983Sgabeblack@google.com	base/loader/elf_object.cc
7611983Sgabeblack@google.com	base/loader/object_file.cc
7711983Sgabeblack@google.com	base/loader/symtab.cc
7811983Sgabeblack@google.com	base/stats/events.cc
7911983Sgabeblack@google.com	base/stats/statdb.cc
8011983Sgabeblack@google.com	base/stats/visit.cc
8111983Sgabeblack@google.com	base/stats/text.cc
8211983Sgabeblack@google.com
8311983Sgabeblack@google.com	cpu/base.cc
8411983Sgabeblack@google.com	cpu/cpu_exec_context.cc
8511983Sgabeblack@google.com	cpu/exetrace.cc
866143Snate@binkert.org        cpu/op_class.cc
878233Snate@binkert.org	cpu/pc_event.cc
888233Snate@binkert.org	cpu/static_inst.cc
898233Snate@binkert.org        cpu/sampler/sampler.cc
906143Snate@binkert.org
916143Snate@binkert.org        mem/connector.cc
926143Snate@binkert.org        mem/mem_object.cc
9311308Santhony.gutierrez@amd.com        mem/physical.cc
948233Snate@binkert.org        mem/port.cc
958233Snate@binkert.org        mem/bus.cc
968233Snate@binkert.org
9711983Sgabeblack@google.com        python/pyconfig.cc
9811983Sgabeblack@google.com        python/embedded_py.cc
994762Snate@binkert.org
1006143Snate@binkert.org	sim/builder.cc
1018233Snate@binkert.org	sim/configfile.cc
1028233Snate@binkert.org	sim/debug.cc
1038233Snate@binkert.org	sim/eventq.cc
1048233Snate@binkert.org	sim/faults.cc
1058233Snate@binkert.org	sim/main.cc
1066143Snate@binkert.org	sim/param.cc
1078233Snate@binkert.org	sim/profile.cc
1088233Snate@binkert.org	sim/root.cc
1098233Snate@binkert.org	sim/serialize.cc
1108233Snate@binkert.org	sim/sim_events.cc
1116143Snate@binkert.org	sim/sim_exit.cc
1126143Snate@binkert.org	sim/sim_object.cc
1136143Snate@binkert.org	sim/startup.cc
1146143Snate@binkert.org	sim/stat_context.cc
1156143Snate@binkert.org	sim/stat_control.cc
1166143Snate@binkert.org	sim/system.cc
1176143Snate@binkert.org	sim/trace_context.cc
1186143Snate@binkert.org        ''')
1196143Snate@binkert.org
1207065Snate@binkert.org# Old FullCPU sources
1216143Snate@binkert.orgfull_cpu_sources = Split('''
1228233Snate@binkert.org	encumbered/cpu/full/bpred.cc
1238233Snate@binkert.org	encumbered/cpu/full/commit.cc
1248233Snate@binkert.org	encumbered/cpu/full/cpu.cc
1258233Snate@binkert.org	encumbered/cpu/full/create_vector.cc
1268233Snate@binkert.org	encumbered/cpu/full/cv_spec_state.cc
1278233Snate@binkert.org	encumbered/cpu/full/dd_queue.cc
1288233Snate@binkert.org	encumbered/cpu/full/dep_link.cc
1298233Snate@binkert.org	encumbered/cpu/full/dispatch.cc
1308233Snate@binkert.org	encumbered/cpu/full/dyn_inst.cc
1318233Snate@binkert.org	encumbered/cpu/full/execute.cc
1328233Snate@binkert.org	encumbered/cpu/full/fetch.cc
1338233Snate@binkert.org	encumbered/cpu/full/floss_reasons.cc
1348233Snate@binkert.org	encumbered/cpu/full/fu_pool.cc
1358233Snate@binkert.org	encumbered/cpu/full/inst_fifo.cc
1368233Snate@binkert.org	encumbered/cpu/full/instpipe.cc
1378233Snate@binkert.org	encumbered/cpu/full/issue.cc
1388233Snate@binkert.org	encumbered/cpu/full/ls_queue.cc
1398233Snate@binkert.org	encumbered/cpu/full/machine_queue.cc
1408233Snate@binkert.org        encumbered/cpu/full/pipetrace.cc
1418233Snate@binkert.org        encumbered/cpu/full/readyq.cc
1428233Snate@binkert.org        encumbered/cpu/full/reg_info.cc
1438233Snate@binkert.org        encumbered/cpu/full/rob_station.cc
1448233Snate@binkert.org        encumbered/cpu/full/spec_memory.cc
1458233Snate@binkert.org        encumbered/cpu/full/spec_state.cc
1468233Snate@binkert.org        encumbered/cpu/full/storebuffer.cc
1478233Snate@binkert.org        encumbered/cpu/full/writeback.cc
1488233Snate@binkert.org        encumbered/cpu/full/iq/iq_station.cc
1498233Snate@binkert.org        encumbered/cpu/full/iq/iqueue.cc
1508233Snate@binkert.org        encumbered/cpu/full/iq/segmented/chain_info.cc
1518233Snate@binkert.org        encumbered/cpu/full/iq/segmented/chain_wire.cc
1528233Snate@binkert.org        encumbered/cpu/full/iq/segmented/iq_seg.cc
1536143Snate@binkert.org        encumbered/cpu/full/iq/segmented/iq_segmented.cc
1546143Snate@binkert.org        encumbered/cpu/full/iq/segmented/seg_chain.cc
1556143Snate@binkert.org        encumbered/cpu/full/iq/seznec/iq_seznec.cc
1566143Snate@binkert.org        encumbered/cpu/full/iq/standard/iq_standard.cc
1576143Snate@binkert.org        ''')
1586143Snate@binkert.org
1599982Satgutier@umich.edutrace_reader_sources = Split('''
16010196SCurtis.Dunham@arm.com        cpu/trace/reader/mem_trace_reader.cc
16110196SCurtis.Dunham@arm.com        cpu/trace/reader/ibm_reader.cc
16210196SCurtis.Dunham@arm.com        cpu/trace/reader/itx_reader.cc
16310196SCurtis.Dunham@arm.com        cpu/trace/reader/m5_reader.cc
16410196SCurtis.Dunham@arm.com        cpu/trace/opt_cpu.cc
16510196SCurtis.Dunham@arm.com        cpu/trace/trace_cpu.cc
16610196SCurtis.Dunham@arm.com        ''')
16710196SCurtis.Dunham@arm.com
1686143Snate@binkert.org
16911983Sgabeblack@google.com
17011983Sgabeblack@google.com# MySql sources
17111983Sgabeblack@google.commysql_sources = Split('''
17211983Sgabeblack@google.com	base/mysql.cc
17311983Sgabeblack@google.com	base/stats/mysql.cc
17411983Sgabeblack@google.com        ''')
17511983Sgabeblack@google.com
17611983Sgabeblack@google.com# Full-system sources
17711983Sgabeblack@google.comfull_system_sources = Split('''
1786143Snate@binkert.org	base/crc.cc
17911988Sandreas.sandberg@arm.com	base/inet.cc
1808233Snate@binkert.org	base/remote_gdb.cc
1818233Snate@binkert.org
1826143Snate@binkert.org	cpu/intr_control.cc
1838945Ssteve.reinhardt@amd.com        cpu/profile.cc
1846143Snate@binkert.org
18511983Sgabeblack@google.com	dev/alpha_console.cc
18611983Sgabeblack@google.com	dev/io_device.cc
1876143Snate@binkert.org
1886143Snate@binkert.org	kern/kernel_binning.cc
1895522Snate@binkert.org	kern/kernel_stats.cc
1906143Snate@binkert.org	kern/system_events.cc
1916143Snate@binkert.org	kern/linux/events.cc
1926143Snate@binkert.org	kern/linux/linux_syscalls.cc
1939982Satgutier@umich.edu	kern/linux/printk.cc
1948233Snate@binkert.org
1958233Snate@binkert.org        mem/vport.cc
1968233Snate@binkert.org
1976143Snate@binkert.org	sim/pseudo_inst.cc
1986143Snate@binkert.org        ''')
1996143Snate@binkert.org
2006143Snate@binkert.org#	dev/baddev.cc
2015522Snate@binkert.org#       dev/simconsole.cc
2025522Snate@binkert.org#	dev/disk_image.cc
2035522Snate@binkert.org#	dev/etherbus.cc
2045522Snate@binkert.org#	dev/etherdump.cc
2055604Snate@binkert.org#	dev/etherint.cc
2065604Snate@binkert.org#	dev/etherlink.cc
2076143Snate@binkert.org#	dev/etherpkt.cc
2086143Snate@binkert.org#	dev/ethertap.cc
2094762Snate@binkert.org#	dev/ide_ctrl.cc
2104762Snate@binkert.org#	dev/ide_disk.cc
2116143Snate@binkert.org#	dev/ns_gige.cc
2126727Ssteve.reinhardt@amd.com#	dev/pciconfigall.cc
2136727Ssteve.reinhardt@amd.com#	dev/pcidev.cc
2146727Ssteve.reinhardt@amd.com#	dev/pcifake.cc
2154762Snate@binkert.org#	dev/pktfifo.cc
2166143Snate@binkert.org#	dev/platform.cc
2176143Snate@binkert.org#	dev/sinic.cc
2186143Snate@binkert.org#	dev/simple_disk.cc
2196143Snate@binkert.org#	dev/tsunami.cc
2206727Ssteve.reinhardt@amd.com#	dev/tsunami_cchip.cc
2216143Snate@binkert.org#	dev/isa_fake.cc
2227674Snate@binkert.org#	dev/tsunami_io.cc
2237674Snate@binkert.org#	dev/tsunami_pchip.cc
2245604Snate@binkert.org#	dev/uart.cc
2256143Snate@binkert.org#	dev/uart8250.cc
2266143Snate@binkert.org
2276143Snate@binkert.orgif env['TARGET_ISA'] == 'alpha':
2284762Snate@binkert.org    full_system_sources += Split('''
2296143Snate@binkert.org	kern/tru64/dump_mbuf.cc
2304762Snate@binkert.org	kern/tru64/printf.cc
2314762Snate@binkert.org	kern/tru64/tru64_events.cc
2324762Snate@binkert.org	kern/tru64/tru64_syscalls.cc
2336143Snate@binkert.org        ''')
2346143Snate@binkert.org
2354762Snate@binkert.org# turbolaser encumbered sources
2368233Snate@binkert.orgturbolaser_sources = Split('''
2378233Snate@binkert.org	encumbered/dev/dma.cc
2388233Snate@binkert.org	encumbered/dev/etherdev.cc
2398233Snate@binkert.org	encumbered/dev/scsi.cc
2406143Snate@binkert.org	encumbered/dev/scsi_ctrl.cc
2416143Snate@binkert.org	encumbered/dev/scsi_disk.cc
2424762Snate@binkert.org	encumbered/dev/scsi_none.cc
2436143Snate@binkert.org	encumbered/dev/tlaser_clock.cc
2444762Snate@binkert.org	encumbered/dev/tlaser_ipi.cc
2459396Sandreas.hansson@arm.com	encumbered/dev/tlaser_mbox.cc
2469396Sandreas.hansson@arm.com	encumbered/dev/tlaser_mc146818.cc
2479396Sandreas.hansson@arm.com	encumbered/dev/tlaser_node.cc
2489396Sandreas.hansson@arm.com	encumbered/dev/tlaser_pcia.cc
2499396Sandreas.hansson@arm.com	encumbered/dev/tlaser_pcidev.cc
2509396Sandreas.hansson@arm.com	encumbered/dev/tlaser_serial.cc
2519396Sandreas.hansson@arm.com	encumbered/dev/turbolaser.cc
2529396Sandreas.hansson@arm.com	encumbered/dev/uart8530.cc
2539396Sandreas.hansson@arm.com        ''')
2549396Sandreas.hansson@arm.com
2559396Sandreas.hansson@arm.com# Syscall emulation (non-full-system) sources
2569396Sandreas.hansson@arm.comsyscall_emulation_sources = Split('''
2579396Sandreas.hansson@arm.com        kern/linux/linux.cc
2589930Sandreas.hansson@arm.com        mem/translating_port.cc
2599930Sandreas.hansson@arm.com        mem/page_table.cc
2609396Sandreas.hansson@arm.com	sim/process.cc
2618235Snate@binkert.org	sim/syscall_emul.cc
2628235Snate@binkert.org        ''')
2636143Snate@binkert.org
2648235Snate@binkert.orgif env['TARGET_ISA'] == 'alpha':
2659003SAli.Saidi@ARM.com    syscall_emulation_sources += Split('''
2668235Snate@binkert.org        kern/tru64/tru64.cc
2678235Snate@binkert.org        ''')
2688235Snate@binkert.org
2698235Snate@binkert.orgalpha_eio_sources = Split('''
2708235Snate@binkert.org	encumbered/eio/exolex.cc
2718235Snate@binkert.org	encumbered/eio/libexo.cc
2728235Snate@binkert.org	encumbered/eio/eio.cc
2738235Snate@binkert.org        ''')
2748235Snate@binkert.org
2758235Snate@binkert.orgif env['TARGET_ISA'] == 'ALPHA_ISA':
2768235Snate@binkert.org    syscall_emulation_sources += alpha_eio_sources
2778235Snate@binkert.org    
2788235Snate@binkert.orgmemtest_sources = Split('''
2798235Snate@binkert.org	cpu/memtest/memtest.cc
2809003SAli.Saidi@ARM.com        ''')
2818235Snate@binkert.org
2825584Snate@binkert.org# Add a flag defining what THE_ISA should be for all compilation
2834382Sbinkertn@umich.eduenv.Append(CPPDEFINES=[('THE_ISA','%s_ISA' % env['TARGET_ISA'].upper())])
2844202Sbinkertn@umich.edu
2854382Sbinkertn@umich.eduarch_sources = SConscript('arch/SConscript',
2864382Sbinkertn@umich.edu                          exports = 'env', duplicate = False)
2879396Sandreas.hansson@arm.com
2885584Snate@binkert.orgcpu_sources = SConscript('cpu/SConscript',
2894382Sbinkertn@umich.edu                         exports = 'env', duplicate = False)
2904382Sbinkertn@umich.edu
2914382Sbinkertn@umich.edu# This is outside of cpu/SConscript since the source directory isn't
2928232Snate@binkert.org# underneath 'cpu'.
2935192Ssaidi@eecs.umich.eduif 'FullCPU' in env['CPU_MODELS']:
2948232Snate@binkert.org    cpu_sources += full_cpu_sources
2958232Snate@binkert.org
2968232Snate@binkert.org# Set up complete list of sources based on configuration.
2975192Ssaidi@eecs.umich.edusources = base_sources + arch_sources + cpu_sources
2988232Snate@binkert.org
2995192Ssaidi@eecs.umich.eduif env['FULL_SYSTEM']:
3005799Snate@binkert.org    sources += full_system_sources
3018232Snate@binkert.org    if env['ALPHA_TLASER']:
3025192Ssaidi@eecs.umich.edu        sources += turbolaser_sources
3035192Ssaidi@eecs.umich.eduelse:
3045192Ssaidi@eecs.umich.edu    sources += syscall_emulation_sources
3058232Snate@binkert.org
3065192Ssaidi@eecs.umich.eduif env['USE_MYSQL']:
3078232Snate@binkert.org    sources += mysql_sources
3085192Ssaidi@eecs.umich.edu
3095192Ssaidi@eecs.umich.edufor opt in env.ExportOptions:
3105192Ssaidi@eecs.umich.edu    env.ConfigFile(opt)
3115192Ssaidi@eecs.umich.edu
3124382Sbinkertn@umich.edu###################################################
3134382Sbinkertn@umich.edu#
3144382Sbinkertn@umich.edu# Special build rules.
3152667Sstever@eecs.umich.edu#
3162667Sstever@eecs.umich.edu###################################################
3172667Sstever@eecs.umich.edu
3182667Sstever@eecs.umich.edu# base/traceflags.{cc,hh} are generated from base/traceflags.py.
3192667Sstever@eecs.umich.edu# $TARGET.base will expand to "<build-dir>/base/traceflags".
3202667Sstever@eecs.umich.eduenv.Command(Split('base/traceflags.hh base/traceflags.cc'),
3215742Snate@binkert.org            'base/traceflags.py',
3225742Snate@binkert.org            'python $SOURCE $TARGET.base')
3235742Snate@binkert.org
3245793Snate@binkert.org# libelf build is described in its own SConscript file.
3258334Snate@binkert.org# SConscript-local is the per-config build, which just copies some
3265793Snate@binkert.org# header files into a place where they can be found.
3275793Snate@binkert.orgSConscript('libelf/SConscript-local', exports = 'env', duplicate=0)
3285793Snate@binkert.orgSConscript('python/SConscript', exports = ['env'], duplicate=0)
3294382Sbinkertn@umich.edu
3304762Snate@binkert.org# This function adds the specified sources to the given build
3315344Sstever@gmail.com# environment, and returns a list of all the corresponding SCons
3324382Sbinkertn@umich.edu# Object nodes (including an extra one for date.cc).  We explicitly
3335341Sstever@gmail.com# add the Object nodes so we can set up special dependencies for
3345742Snate@binkert.org# date.cc.
3355742Snate@binkert.orgdef make_objs(sources, env):
3365742Snate@binkert.org    objs = [env.Object(s) for s in sources]
3375742Snate@binkert.org    # make date.cc depend on all other objects so it always gets
3385742Snate@binkert.org    # recompiled whenever anything else does
3394762Snate@binkert.org    date_obj = env.Object('base/date.cc')
3405742Snate@binkert.org    env.Depends(date_obj, objs)
3415742Snate@binkert.org    objs.append(date_obj)
34211984Sgabeblack@google.com    return objs
3437722Sgblack@eecs.umich.edu
3445742Snate@binkert.org###################################################
3455742Snate@binkert.org#
3465742Snate@binkert.org# Define binaries.  Each different build type (debug, opt, etc.) gets
3479930Sandreas.hansson@arm.com# a slightly different build environment.
3489930Sandreas.hansson@arm.com#
3499930Sandreas.hansson@arm.com###################################################
3509930Sandreas.hansson@arm.com
3519930Sandreas.hansson@arm.com# Include file paths are rooted in this directory.  SCons will
3525742Snate@binkert.org# automatically expand '.' to refer to both the source directory and
3538242Sbradley.danofsky@amd.com# the corresponding build directory to pick up generated include
3548242Sbradley.danofsky@amd.com# files.
3558242Sbradley.danofsky@amd.comenv.Append(CPPPATH='.')
3568242Sbradley.danofsky@amd.comenv.Append(CPPPATH='./libelf')
3575341Sstever@gmail.com
3585742Snate@binkert.org# Debug binary
3597722Sgblack@eecs.umich.edudebugEnv = env.Copy(OBJSUFFIX='.do')
3604773Snate@binkert.orgdebugEnv.Label = 'debug'
3616108Snate@binkert.orgdebugEnv.Append(CCFLAGS=Split('-g -gstabs+ -O0'))
3621858SN/AdebugEnv.Append(CPPDEFINES='DEBUG')
3631085SN/Atlist = debugEnv.Program(target = 'm5.debug',
3646658Snate@binkert.org                         source = make_objs(sources, debugEnv))
3656658Snate@binkert.orgdebugEnv.M5Binary = tlist[0]
3667673Snate@binkert.org
3676658Snate@binkert.org# Optimized binary
3686658Snate@binkert.orgoptEnv = env.Copy()
36911308Santhony.gutierrez@amd.comoptEnv.Label = 'opt'
3706658Snate@binkert.orgoptEnv.Append(CCFLAGS=Split('-g -O5'))
37111308Santhony.gutierrez@amd.comtlist = optEnv.Program(target = 'm5.opt',
3726658Snate@binkert.org                       source = make_objs(sources, optEnv))
3736658Snate@binkert.orgoptEnv.M5Binary = tlist[0]
3747673Snate@binkert.org
3757673Snate@binkert.org# "Fast" binary
3767673Snate@binkert.orgfastEnv = env.Copy(OBJSUFFIX='.fo')
3777673Snate@binkert.orgfastEnv.Label = 'fast'
3787673Snate@binkert.orgfastEnv.Append(CCFLAGS=Split('-O5'))
3797673Snate@binkert.orgfastEnv.Append(CPPDEFINES='NDEBUG')
3807673Snate@binkert.orgfastEnv.Program(target = 'm5.fast.unstripped',
38110467Sandreas.hansson@arm.com                source = make_objs(sources, fastEnv))
3826658Snate@binkert.orgtlist = fastEnv.Command(target = 'm5.fast',
3837673Snate@binkert.org                        source = 'm5.fast.unstripped',
38410467Sandreas.hansson@arm.com                        action = 'strip $SOURCE -o $TARGET')
38510467Sandreas.hansson@arm.comfastEnv.M5Binary = tlist[0]
38610467Sandreas.hansson@arm.com
38710467Sandreas.hansson@arm.com# Profiled binary
38810467Sandreas.hansson@arm.comprofEnv = env.Copy(OBJSUFFIX='.po')
38910467Sandreas.hansson@arm.comprofEnv.Label = 'prof'
39010467Sandreas.hansson@arm.comprofEnv.Append(CCFLAGS=Split('-O5 -g -pg'), LINKFLAGS='-pg')
39110467Sandreas.hansson@arm.comtlist = profEnv.Program(target = 'm5.prof',
39210467Sandreas.hansson@arm.com                        source = make_objs(sources, profEnv))
39310467Sandreas.hansson@arm.comprofEnv.M5Binary = tlist[0]
39410467Sandreas.hansson@arm.com
3957673Snate@binkert.orgenvList = [debugEnv, optEnv, fastEnv, profEnv]
3967673Snate@binkert.org
3977673Snate@binkert.orgReturn('envList')
3987673Snate@binkert.org