SConscript revision 2290
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. 37955SN/AImport('env') 385522Snate@binkert.org 394202Sbinkertn@umich.edu################################################### 405742Snate@binkert.org# 41955SN/A# Define needed sources. 424381Sbinkertn@umich.edu# 434381Sbinkertn@umich.edu################################################### 448334Snate@binkert.org 45955SN/A# Base sources used by all configurations. 46955SN/A 474202Sbinkertn@umich.edubase_sources = Split(''' 48955SN/A base/circlebuf.cc 494382Sbinkertn@umich.edu base/copyright.cc 504382Sbinkertn@umich.edu base/cprintf.cc 514382Sbinkertn@umich.edu base/embedfile.cc 526654Snate@binkert.org base/fast_alloc.cc 535517Snate@binkert.org base/fifo_buffer.cc 548614Sgblack@eecs.umich.edu base/hostinfo.cc 557674Snate@binkert.org base/hybrid_pred.cc 566143Snate@binkert.org base/inifile.cc 576143Snate@binkert.org base/intmath.cc 586143Snate@binkert.org base/match.cc 598233Snate@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 648334Snate@binkert.org base/sat_counter.cc 658334Snate@binkert.org base/socket.cc 668233Snate@binkert.org base/statistics.cc 678233Snate@binkert.org base/str.cc 688233Snate@binkert.org base/time.cc 698233Snate@binkert.org base/trace.cc 708233Snate@binkert.org base/traceflags.cc 718233Snate@binkert.org base/userinfo.cc 726143Snate@binkert.org base/compression/lzss_compression.cc 738233Snate@binkert.org base/loader/aout_object.cc 748233Snate@binkert.org base/loader/ecoff_object.cc 758233Snate@binkert.org base/loader/elf_object.cc 766143Snate@binkert.org base/loader/object_file.cc 776143Snate@binkert.org base/loader/symtab.cc 786143Snate@binkert.org base/stats/events.cc 796143Snate@binkert.org base/stats/statdb.cc 808233Snate@binkert.org base/stats/visit.cc 818233Snate@binkert.org base/stats/text.cc 828233Snate@binkert.org 836143Snate@binkert.org cpu/base.cc 848233Snate@binkert.org cpu/base_dyn_inst.cc 858233Snate@binkert.org cpu/cpu_exec_context.cc 868233Snate@binkert.org cpu/exetrace.cc 878233Snate@binkert.org cpu/pc_event.cc 886143Snate@binkert.org cpu/quiesce_event.cc 896143Snate@binkert.org cpu/static_inst.cc 906143Snate@binkert.org cpu/sampler/sampler.cc 914762Snate@binkert.org cpu/trace/reader/mem_trace_reader.cc 926143Snate@binkert.org cpu/trace/reader/ibm_reader.cc 938233Snate@binkert.org cpu/trace/reader/itx_reader.cc 948233Snate@binkert.org cpu/trace/reader/m5_reader.cc 958233Snate@binkert.org cpu/trace/opt_cpu.cc 968233Snate@binkert.org cpu/trace/trace_cpu.cc 978233Snate@binkert.org 986143Snate@binkert.org encumbered/mem/functional/main.cc 998233Snate@binkert.org 1008233Snate@binkert.org mem/base_hier.cc 1018233Snate@binkert.org mem/base_mem.cc 1028233Snate@binkert.org mem/hier_params.cc 1036143Snate@binkert.org mem/mem_cmd.cc 1046143Snate@binkert.org mem/mem_debug.cc 1056143Snate@binkert.org mem/mem_req.cc 1066143Snate@binkert.org mem/memory_interface.cc 1076143Snate@binkert.org mem/bus/base_interface.cc 1086143Snate@binkert.org mem/bus/bus.cc 1096143Snate@binkert.org mem/bus/bus_bridge.cc 1106143Snate@binkert.org mem/bus/bus_bridge_master.cc 1116143Snate@binkert.org mem/bus/bus_bridge_slave.cc 1127065Snate@binkert.org mem/bus/bus_interface.cc 1136143Snate@binkert.org mem/bus/dma_bus_interface.cc 1148233Snate@binkert.org mem/bus/dma_interface.cc 1158233Snate@binkert.org mem/bus/master_interface.cc 1168233Snate@binkert.org mem/bus/slave_interface.cc 1178233Snate@binkert.org mem/cache/base_cache.cc 1188233Snate@binkert.org mem/cache/cache.cc 1198233Snate@binkert.org mem/cache/cache_builder.cc 1208233Snate@binkert.org mem/cache/coherence/coherence_protocol.cc 1218233Snate@binkert.org mem/cache/coherence/uni_coherence.cc 1228233Snate@binkert.org mem/cache/miss/blocking_buffer.cc 1238233Snate@binkert.org mem/cache/miss/miss_queue.cc 1248233Snate@binkert.org mem/cache/miss/mshr.cc 1258233Snate@binkert.org mem/cache/miss/mshr_queue.cc 1268233Snate@binkert.org mem/cache/prefetch/base_prefetcher.cc 1278233Snate@binkert.org mem/cache/prefetch/prefetcher.cc 1288233Snate@binkert.org mem/cache/prefetch/tagged_prefetcher.cc 1298233Snate@binkert.org mem/cache/tags/base_tags.cc 1308233Snate@binkert.org mem/cache/tags/cache_tags.cc 1318233Snate@binkert.org mem/cache/tags/fa_lru.cc 1328233Snate@binkert.org mem/cache/tags/iic.cc 1338233Snate@binkert.org mem/cache/tags/lru.cc 1348233Snate@binkert.org mem/cache/tags/repl/gen.cc 1358233Snate@binkert.org mem/cache/tags/repl/repl.cc 1368233Snate@binkert.org mem/cache/tags/split.cc 1378233Snate@binkert.org mem/cache/tags/split_lru.cc 1388233Snate@binkert.org mem/cache/tags/split_lifo.cc 1398233Snate@binkert.org mem/functional/functional.cc 1408233Snate@binkert.org mem/timing/base_memory.cc 1418233Snate@binkert.org mem/timing/dram_memory.cc 1428233Snate@binkert.org mem/timing/dram_mem_bank.cc 1438233Snate@binkert.org mem/timing/dram_memory_builder.cc 1448233Snate@binkert.org mem/timing/memory_builder.cc 1456143Snate@binkert.org mem/timing/simple_mem_bank.cc 1466143Snate@binkert.org mem/trace/itx_writer.cc 1476143Snate@binkert.org mem/trace/mem_trace_writer.cc 1486143Snate@binkert.org mem/trace/m5_writer.cc 1496143Snate@binkert.org 1506143Snate@binkert.org python/pyconfig.cc 1516143Snate@binkert.org python/embedded_py.cc 1526143Snate@binkert.org 1536143Snate@binkert.org sim/builder.cc 1548233Snate@binkert.org sim/configfile.cc 1558233Snate@binkert.org sim/debug.cc 1568233Snate@binkert.org sim/eventq.cc 1576143Snate@binkert.org sim/faults.cc 1586143Snate@binkert.org sim/main.cc 1596143Snate@binkert.org sim/param.cc 1606143Snate@binkert.org sim/profile.cc 1616143Snate@binkert.org sim/root.cc 1626143Snate@binkert.org sim/serialize.cc 1635522Snate@binkert.org sim/sim_events.cc 1646143Snate@binkert.org sim/sim_exit.cc 1656143Snate@binkert.org sim/sim_object.cc 1666143Snate@binkert.org sim/startup.cc 1676143Snate@binkert.org sim/stat_context.cc 1688233Snate@binkert.org sim/stat_control.cc 1698233Snate@binkert.org sim/trace_context.cc 1708233Snate@binkert.org ''') 1716143Snate@binkert.org 1726143Snate@binkert.org# Old FullCPU sources 1736143Snate@binkert.orgfull_cpu_sources = Split(''' 1746143Snate@binkert.org encumbered/cpu/full/bpred.cc 1755522Snate@binkert.org encumbered/cpu/full/commit.cc 1765522Snate@binkert.org encumbered/cpu/full/cpu.cc 1775522Snate@binkert.org encumbered/cpu/full/create_vector.cc 1785522Snate@binkert.org encumbered/cpu/full/cv_spec_state.cc 1795604Snate@binkert.org encumbered/cpu/full/dd_queue.cc 1805604Snate@binkert.org encumbered/cpu/full/dep_link.cc 1816143Snate@binkert.org encumbered/cpu/full/dispatch.cc 1826143Snate@binkert.org encumbered/cpu/full/dyn_inst.cc 1834762Snate@binkert.org encumbered/cpu/full/execute.cc 1844762Snate@binkert.org encumbered/cpu/full/fetch.cc 1856143Snate@binkert.org encumbered/cpu/full/floss_reasons.cc 1866727Ssteve.reinhardt@amd.com encumbered/cpu/full/fu_pool.cc 1876727Ssteve.reinhardt@amd.com encumbered/cpu/full/inst_fifo.cc 1886727Ssteve.reinhardt@amd.com encumbered/cpu/full/instpipe.cc 1894762Snate@binkert.org encumbered/cpu/full/issue.cc 1906143Snate@binkert.org encumbered/cpu/full/ls_queue.cc 1916143Snate@binkert.org encumbered/cpu/full/machine_queue.cc 1926143Snate@binkert.org encumbered/cpu/full/pipetrace.cc 1936143Snate@binkert.org encumbered/cpu/full/readyq.cc 1946727Ssteve.reinhardt@amd.com encumbered/cpu/full/reg_info.cc 1956143Snate@binkert.org encumbered/cpu/full/rob_station.cc 1967674Snate@binkert.org encumbered/cpu/full/spec_memory.cc 1977674Snate@binkert.org encumbered/cpu/full/spec_state.cc 1985604Snate@binkert.org encumbered/cpu/full/storebuffer.cc 1996143Snate@binkert.org encumbered/cpu/full/writeback.cc 2006143Snate@binkert.org encumbered/cpu/full/iq/iq_station.cc 2016143Snate@binkert.org encumbered/cpu/full/iq/iqueue.cc 2024762Snate@binkert.org encumbered/cpu/full/iq/segmented/chain_info.cc 2036143Snate@binkert.org encumbered/cpu/full/iq/segmented/chain_wire.cc 2044762Snate@binkert.org encumbered/cpu/full/iq/segmented/iq_seg.cc 2054762Snate@binkert.org encumbered/cpu/full/iq/segmented/iq_segmented.cc 2064762Snate@binkert.org encumbered/cpu/full/iq/segmented/seg_chain.cc 2076143Snate@binkert.org encumbered/cpu/full/iq/seznec/iq_seznec.cc 2086143Snate@binkert.org encumbered/cpu/full/iq/standard/iq_standard.cc 2094762Snate@binkert.org ''') 2108233Snate@binkert.org 2118233Snate@binkert.org# MySql sources 2128233Snate@binkert.orgmysql_sources = Split(''' 2138233Snate@binkert.org base/mysql.cc 2146143Snate@binkert.org base/stats/mysql.cc 2156143Snate@binkert.org ''') 2164762Snate@binkert.org 2176143Snate@binkert.org# Full-system sources 2184762Snate@binkert.orgfull_system_sources = Split(''' 2196143Snate@binkert.org base/crc.cc 2204762Snate@binkert.org base/inet.cc 2216143Snate@binkert.org base/remote_gdb.cc 2228233Snate@binkert.org 2238233Snate@binkert.org cpu/intr_control.cc 2248233Snate@binkert.org cpu/profile.cc 2256143Snate@binkert.org 2266143Snate@binkert.org dev/alpha_console.cc 2276143Snate@binkert.org dev/baddev.cc 2286143Snate@binkert.org dev/simconsole.cc 2296143Snate@binkert.org dev/disk_image.cc 2306143Snate@binkert.org dev/etherbus.cc 2316143Snate@binkert.org dev/etherdump.cc 2326143Snate@binkert.org dev/etherint.cc 2338233Snate@binkert.org dev/etherlink.cc 2348233Snate@binkert.org dev/etherpkt.cc 235955SN/A dev/ethertap.cc 2368235Snate@binkert.org dev/ide_ctrl.cc 2378235Snate@binkert.org dev/ide_disk.cc 2386143Snate@binkert.org dev/io_device.cc 2398235Snate@binkert.org dev/ns_gige.cc 2408235Snate@binkert.org dev/pciconfigall.cc 2418235Snate@binkert.org dev/pcidev.cc 2428235Snate@binkert.org dev/pcifake.cc 2438235Snate@binkert.org dev/pktfifo.cc 2448235Snate@binkert.org dev/platform.cc 2458235Snate@binkert.org dev/sinic.cc 2468235Snate@binkert.org dev/simple_disk.cc 2478235Snate@binkert.org dev/tsunami.cc 2488235Snate@binkert.org dev/tsunami_cchip.cc 2498235Snate@binkert.org dev/isa_fake.cc 2508235Snate@binkert.org dev/tsunami_io.cc 2518235Snate@binkert.org dev/tsunami_pchip.cc 2528235Snate@binkert.org dev/uart.cc 2538235Snate@binkert.org dev/uart8250.cc 2548235Snate@binkert.org 2558235Snate@binkert.org kern/kernel_binning.cc 2565584Snate@binkert.org kern/kernel_stats.cc 2574382Sbinkertn@umich.edu kern/system_events.cc 2584202Sbinkertn@umich.edu kern/linux/events.cc 2594382Sbinkertn@umich.edu kern/linux/linux_syscalls.cc 2604382Sbinkertn@umich.edu kern/linux/printk.cc 2614382Sbinkertn@umich.edu kern/tru64/dump_mbuf.cc 2625584Snate@binkert.org kern/tru64/printf.cc 2634382Sbinkertn@umich.edu kern/tru64/tru64_events.cc 2644382Sbinkertn@umich.edu kern/tru64/tru64_syscalls.cc 2654382Sbinkertn@umich.edu 2668232Snate@binkert.org mem/functional/memory_control.cc 2675192Ssaidi@eecs.umich.edu mem/functional/physical.cc 2688232Snate@binkert.org 2698232Snate@binkert.org sim/system.cc 2708232Snate@binkert.org sim/pseudo_inst.cc 2715192Ssaidi@eecs.umich.edu ''') 2728232Snate@binkert.org 2735192Ssaidi@eecs.umich.edu# turbolaser encumbered sources 2745799Snate@binkert.orgturbolaser_sources = Split(''' 2758232Snate@binkert.org encumbered/dev/dma.cc 2765192Ssaidi@eecs.umich.edu encumbered/dev/etherdev.cc 2775192Ssaidi@eecs.umich.edu encumbered/dev/scsi.cc 2785192Ssaidi@eecs.umich.edu encumbered/dev/scsi_ctrl.cc 2798232Snate@binkert.org encumbered/dev/scsi_disk.cc 2805192Ssaidi@eecs.umich.edu encumbered/dev/scsi_none.cc 2818232Snate@binkert.org encumbered/dev/tlaser_clock.cc 2825192Ssaidi@eecs.umich.edu encumbered/dev/tlaser_ipi.cc 2835192Ssaidi@eecs.umich.edu encumbered/dev/tlaser_mbox.cc 2845192Ssaidi@eecs.umich.edu encumbered/dev/tlaser_mc146818.cc 2855192Ssaidi@eecs.umich.edu encumbered/dev/tlaser_node.cc 2864382Sbinkertn@umich.edu encumbered/dev/tlaser_pcia.cc 2874382Sbinkertn@umich.edu encumbered/dev/tlaser_pcidev.cc 2884382Sbinkertn@umich.edu encumbered/dev/tlaser_serial.cc 2892667Sstever@eecs.umich.edu encumbered/dev/turbolaser.cc 2902667Sstever@eecs.umich.edu encumbered/dev/uart8530.cc 2912667Sstever@eecs.umich.edu ''') 2922667Sstever@eecs.umich.edu 2932667Sstever@eecs.umich.edu# Syscall emulation (non-full-system) sources 2942667Sstever@eecs.umich.edusyscall_emulation_sources = Split(''' 2955742Snate@binkert.org cpu/memtest/memtest.cc 2965742Snate@binkert.org encumbered/eio/eio.cc 2975742Snate@binkert.org encumbered/eio/exolex.cc 2985793Snate@binkert.org encumbered/eio/libexo.cc 2998334Snate@binkert.org kern/linux/linux.cc 3005793Snate@binkert.org kern/tru64/tru64.cc 3015793Snate@binkert.org sim/process.cc 3025793Snate@binkert.org sim/syscall_emul.cc 3034382Sbinkertn@umich.edu ''') 3044762Snate@binkert.org 3055344Sstever@gmail.com# Add a flag defining what THE_ISA should be for all compilation 3064382Sbinkertn@umich.eduenv.Append(CPPDEFINES=[('THE_ISA','%s_ISA' % env['TARGET_ISA'].upper())]) 3075341Sstever@gmail.com 3085742Snate@binkert.orgarch_sources = SConscript('arch/SConscript', 3095742Snate@binkert.org exports = 'env', duplicate = False) 3105742Snate@binkert.org 3115742Snate@binkert.orgcpu_sources = SConscript('cpu/SConscript', 3125742Snate@binkert.org exports = 'env', duplicate = False) 3134762Snate@binkert.org 3145742Snate@binkert.org# This is outside of cpu/SConscript since the source directory isn't 3155742Snate@binkert.org# underneath 'cpu'. 3167722Sgblack@eecs.umich.eduif 'FullCPU' in env['CPU_MODELS']: 3175742Snate@binkert.org cpu_sources += full_cpu_sources 3185742Snate@binkert.org 3195742Snate@binkert.org# Set up complete list of sources based on configuration. 3205742Snate@binkert.orgsources = base_sources + arch_sources + cpu_sources 3218242Sbradley.danofsky@amd.com 3228242Sbradley.danofsky@amd.comif env['FULL_SYSTEM']: 3238242Sbradley.danofsky@amd.com sources += full_system_sources 3248242Sbradley.danofsky@amd.com if env['ALPHA_TLASER']: 3255341Sstever@gmail.com sources += turbolaser_sources 3265742Snate@binkert.orgelse: 3277722Sgblack@eecs.umich.edu sources += syscall_emulation_sources 3284773Snate@binkert.org 3296108Snate@binkert.orgif env['USE_MYSQL']: 3301858SN/A sources += mysql_sources 3311085SN/A 3326658Snate@binkert.orgfor opt in env.ExportOptions: 3336658Snate@binkert.org env.ConfigFile(opt) 3347673Snate@binkert.org 3356658Snate@binkert.org################################################### 3366658Snate@binkert.org# 3376658Snate@binkert.org# Special build rules. 3386658Snate@binkert.org# 3396658Snate@binkert.org################################################### 3406658Snate@binkert.org 3416658Snate@binkert.org# base/traceflags.{cc,hh} are generated from base/traceflags.py. 3427673Snate@binkert.org# $TARGET.base will expand to "<build-dir>/base/traceflags". 3437673Snate@binkert.orgenv.Command(Split('base/traceflags.hh base/traceflags.cc'), 3447673Snate@binkert.org 'base/traceflags.py', 3457673Snate@binkert.org 'python $SOURCE $TARGET.base') 3467673Snate@binkert.org 3477673Snate@binkert.org# libelf build is described in its own SConscript file. 3487673Snate@binkert.org# SConscript-local is the per-config build, which just copies some 3496658Snate@binkert.org# header files into a place where they can be found. 3507673Snate@binkert.orgSConscript('libelf/SConscript-local', exports = 'env', duplicate=0) 3517673Snate@binkert.orgSConscript('python/SConscript', exports = ['env'], duplicate=0) 3527673Snate@binkert.org 3537673Snate@binkert.org# This function adds the specified sources to the given build 3547673Snate@binkert.org# environment, and returns a list of all the corresponding SCons 3557673Snate@binkert.org# Object nodes (including an extra one for date.cc). We explicitly 3567673Snate@binkert.org# add the Object nodes so we can set up special dependencies for 3577673Snate@binkert.org# date.cc. 3587673Snate@binkert.orgdef make_objs(sources, env): 3597673Snate@binkert.org objs = [env.Object(s) for s in sources] 3606658Snate@binkert.org # make date.cc depend on all other objects so it always gets 3617756SAli.Saidi@ARM.com # recompiled whenever anything else does 3627816Ssteve.reinhardt@amd.com date_obj = env.Object('base/date.cc') 3636658Snate@binkert.org env.Depends(date_obj, objs) 3644382Sbinkertn@umich.edu objs.append(date_obj) 3654382Sbinkertn@umich.edu return objs 3664762Snate@binkert.org 3674762Snate@binkert.org################################################### 3684762Snate@binkert.org# 3696654Snate@binkert.org# Define binaries. Each different build type (debug, opt, etc.) gets 3706654Snate@binkert.org# a slightly different build environment. 3715517Snate@binkert.org# 3725517Snate@binkert.org################################################### 3735517Snate@binkert.org 3745517Snate@binkert.org# Include file paths are rooted in this directory. SCons will 3755517Snate@binkert.org# automatically expand '.' to refer to both the source directory and 3765517Snate@binkert.org# the corresponding build directory to pick up generated include 3775517Snate@binkert.org# files. 3785517Snate@binkert.orgenv.Append(CPPPATH='.') 3795517Snate@binkert.orgenv.Append(CPPPATH='./libelf') 3805517Snate@binkert.org 3815517Snate@binkert.org# Debug binary 3825517Snate@binkert.orgdebugEnv = env.Copy(OBJSUFFIX='.do') 3835517Snate@binkert.orgdebugEnv.Label = 'debug' 3845517Snate@binkert.orgdebugEnv.Append(CCFLAGS=Split('-g -gstabs+ -O0')) 3855517Snate@binkert.orgdebugEnv.Append(CPPDEFINES='DEBUG') 3865517Snate@binkert.orgtlist = debugEnv.Program(target = 'm5.debug', 3875517Snate@binkert.org source = make_objs(sources, debugEnv)) 3886654Snate@binkert.orgdebugEnv.M5Binary = tlist[0] 3895517Snate@binkert.org 3905517Snate@binkert.org# Optimized binary 3915517Snate@binkert.orgoptEnv = env.Copy() 3925517Snate@binkert.orgoptEnv.Label = 'opt' 3935517Snate@binkert.orgoptEnv.Append(CCFLAGS=Split('-g -O5')) 3945517Snate@binkert.orgtlist = optEnv.Program(target = 'm5.opt', 3955517Snate@binkert.org source = make_objs(sources, optEnv)) 3965517Snate@binkert.orgoptEnv.M5Binary = tlist[0] 3976143Snate@binkert.org 3986654Snate@binkert.org# "Fast" binary 3995517Snate@binkert.orgfastEnv = env.Copy(OBJSUFFIX='.fo') 4005517Snate@binkert.orgfastEnv.Label = 'fast' 4015517Snate@binkert.orgfastEnv.Append(CCFLAGS=Split('-O5')) 4025517Snate@binkert.orgfastEnv.Append(CPPDEFINES='NDEBUG') 4035517Snate@binkert.orgfastEnv.Program(target = 'm5.fast.unstripped', 4045517Snate@binkert.org source = make_objs(sources, fastEnv)) 4055517Snate@binkert.orgtlist = fastEnv.Command(target = 'm5.fast', 4065517Snate@binkert.org source = 'm5.fast.unstripped', 4075517Snate@binkert.org action = 'strip $SOURCE -o $TARGET') 4085517Snate@binkert.orgfastEnv.M5Binary = tlist[0] 4095517Snate@binkert.org 4105517Snate@binkert.org# Profiled binary 4115517Snate@binkert.orgprofEnv = env.Copy(OBJSUFFIX='.po') 4125517Snate@binkert.orgprofEnv.Label = 'prof' 4136654Snate@binkert.orgprofEnv.Append(CCFLAGS=Split('-O5 -g -pg'), LINKFLAGS='-pg') 4146654Snate@binkert.orgtlist = profEnv.Program(target = 'm5.prof', 4155517Snate@binkert.org source = make_objs(sources, profEnv)) 4165517Snate@binkert.orgprofEnv.M5Binary = tlist[0] 4176143Snate@binkert.org 4186143Snate@binkert.orgenvList = [debugEnv, optEnv, fastEnv, profEnv] 4196143Snate@binkert.org 4206727Ssteve.reinhardt@amd.comReturn('envList') 4215517Snate@binkert.org