SConscript revision 955
1955SN/A# -*- mode:python -*- 2955SN/A 313576Sciro.santilli@arm.com# Copyright (c) 2004 The Regents of The University of Michigan 413576Sciro.santilli@arm.com# All rights reserved. 513576Sciro.santilli@arm.com# 613576Sciro.santilli@arm.com# Redistribution and use in source and binary forms, with or without 713576Sciro.santilli@arm.com# modification, are permitted provided that the following conditions are 813576Sciro.santilli@arm.com# met: redistributions of source code must retain the above copyright 913576Sciro.santilli@arm.com# notice, this list of conditions and the following disclaimer; 1013576Sciro.santilli@arm.com# redistributions in binary form must reproduce the above copyright 1113576Sciro.santilli@arm.com# notice, this list of conditions and the following disclaimer in the 1213576Sciro.santilli@arm.com# documentation and/or other materials provided with the distribution; 1313576Sciro.santilli@arm.com# neither the name of the copyright holders nor the names of its 141762SN/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. 28955SN/A 29955SN/Aimport os 30955SN/Aimport sys 31955SN/A 32955SN/A# This file defines how to build a particular configuration of M5 33955SN/A# based on variable settings in the 'env' build environment. 34955SN/A 35955SN/A# Import build environment variable from SConstruct. 36955SN/AImport('env') 37955SN/A 38955SN/A################################################### 392665Ssaidi@eecs.umich.edu# 404762Snate@binkert.org# Define needed sources. 41955SN/A# 4212563Sgabeblack@google.com################################################### 4312563Sgabeblack@google.com 445522Snate@binkert.org# Base sources used by all configurations. 456143Snate@binkert.orgbase_sources = Split(''' 4612371Sgabeblack@google.com arch/alpha/decoder.cc 474762Snate@binkert.org arch/alpha/fast_cpu_exec.cc 485522Snate@binkert.org arch/alpha/simple_cpu_exec.cc 49955SN/A arch/alpha/full_cpu_exec.cc 505522Snate@binkert.org arch/alpha/faults.cc 5111974Sgabeblack@google.com arch/alpha/isa_traits.cc 52955SN/A 535522Snate@binkert.org base/circlebuf.cc 544202Sbinkertn@umich.edu base/copyright.cc 555742Snate@binkert.org base/cprintf.cc 56955SN/A base/fast_alloc.cc 574381Sbinkertn@umich.edu base/fifo_buffer.cc 584381Sbinkertn@umich.edu base/hostinfo.cc 5912246Sgabeblack@google.com base/hybrid_pred.cc 6012246Sgabeblack@google.com base/inifile.cc 618334Snate@binkert.org base/intmath.cc 62955SN/A base/misc.cc 63955SN/A base/pollevent.cc 644202Sbinkertn@umich.edu base/python.cc 65955SN/A base/range.cc 664382Sbinkertn@umich.edu base/sat_counter.cc 674382Sbinkertn@umich.edu base/socket.cc 684382Sbinkertn@umich.edu base/statistics.cc 696654Snate@binkert.org base/str.cc 705517Snate@binkert.org base/time.cc 718614Sgblack@eecs.umich.edu base/trace.cc 727674Snate@binkert.org base/traceflags.cc 736143Snate@binkert.org base/userinfo.cc 746143Snate@binkert.org base/compression/lzss_compression.cc 756143Snate@binkert.org base/loader/aout_object.cc 7612302Sgabeblack@google.com base/loader/ecoff_object.cc 7712302Sgabeblack@google.com base/loader/elf_object.cc 7812302Sgabeblack@google.com base/loader/object_file.cc 7912371Sgabeblack@google.com base/loader/symtab.cc 8012371Sgabeblack@google.com base/stats/events.cc 8112371Sgabeblack@google.com base/stats/python.cc 8212371Sgabeblack@google.com base/stats/statdb.cc 8312371Sgabeblack@google.com base/stats/visit.cc 8412371Sgabeblack@google.com base/stats/text.cc 8512371Sgabeblack@google.com 8612371Sgabeblack@google.com cpu/base_cpu.cc 8712371Sgabeblack@google.com cpu/exec_context.cc 8812371Sgabeblack@google.com cpu/exetrace.cc 8912371Sgabeblack@google.com cpu/pc_event.cc 9012371Sgabeblack@google.com cpu/static_inst.cc 9112371Sgabeblack@google.com cpu/fast_cpu/fast_cpu.cc 9212371Sgabeblack@google.com cpu/full_cpu/bpred.cc 9312371Sgabeblack@google.com cpu/full_cpu/commit.cc 9412371Sgabeblack@google.com cpu/full_cpu/create_vector.cc 9512371Sgabeblack@google.com cpu/full_cpu/cv_spec_state.cc 9612371Sgabeblack@google.com cpu/full_cpu/dd_queue.cc 9712371Sgabeblack@google.com cpu/full_cpu/dep_link.cc 9812371Sgabeblack@google.com cpu/full_cpu/dispatch.cc 9912371Sgabeblack@google.com cpu/full_cpu/dyn_inst.cc 10012371Sgabeblack@google.com cpu/full_cpu/execute.cc 10112371Sgabeblack@google.com cpu/full_cpu/fetch.cc 10212371Sgabeblack@google.com cpu/full_cpu/floss_reasons.cc 10312371Sgabeblack@google.com cpu/full_cpu/fu_pool.cc 10412371Sgabeblack@google.com cpu/full_cpu/full_cpu.cc 10512371Sgabeblack@google.com cpu/full_cpu/inst_fifo.cc 10612371Sgabeblack@google.com cpu/full_cpu/instpipe.cc 10712371Sgabeblack@google.com cpu/full_cpu/issue.cc 10812371Sgabeblack@google.com cpu/full_cpu/ls_queue.cc 10912371Sgabeblack@google.com cpu/full_cpu/machine_queue.cc 11012371Sgabeblack@google.com cpu/full_cpu/pipetrace.cc 11112371Sgabeblack@google.com cpu/full_cpu/readyq.cc 11212371Sgabeblack@google.com cpu/full_cpu/reg_info.cc 11312371Sgabeblack@google.com cpu/full_cpu/rob_station.cc 11412371Sgabeblack@google.com cpu/full_cpu/spec_memory.cc 11512371Sgabeblack@google.com cpu/full_cpu/spec_state.cc 11612371Sgabeblack@google.com cpu/full_cpu/storebuffer.cc 11712371Sgabeblack@google.com cpu/full_cpu/writeback.cc 11812371Sgabeblack@google.com cpu/full_cpu/iq/iq_station.cc 11912371Sgabeblack@google.com cpu/full_cpu/iq/iqueue.cc 12012371Sgabeblack@google.com cpu/full_cpu/iq/segmented/chain_info.cc 12112371Sgabeblack@google.com cpu/full_cpu/iq/segmented/chain_wire.cc 12212371Sgabeblack@google.com cpu/full_cpu/iq/segmented/iq_seg.cc 12312371Sgabeblack@google.com cpu/full_cpu/iq/segmented/iq_segmented.cc 12412371Sgabeblack@google.com cpu/full_cpu/iq/segmented/seg_chain.cc 12512371Sgabeblack@google.com cpu/full_cpu/iq/seznec/iq_seznec.cc 12612302Sgabeblack@google.com cpu/full_cpu/iq/standard/iq_standard.cc 12712371Sgabeblack@google.com cpu/sampling_cpu/sampling_cpu.cc 12812302Sgabeblack@google.com cpu/simple_cpu/simple_cpu.cc 12912371Sgabeblack@google.com cpu/trace/reader/mem_trace_reader.cc 13012302Sgabeblack@google.com cpu/trace/reader/ibm_reader.cc 13112302Sgabeblack@google.com cpu/trace/reader/itx_reader.cc 13212371Sgabeblack@google.com cpu/trace/reader/m5_reader.cc 13312371Sgabeblack@google.com 13412371Sgabeblack@google.com mem/base_hier.cc 13512371Sgabeblack@google.com mem/base_mem.cc 13612302Sgabeblack@google.com mem/hier_params.cc 13712371Sgabeblack@google.com mem/mem_cmd.cc 13812371Sgabeblack@google.com mem/mem_debug.cc 13912371Sgabeblack@google.com mem/mem_req.cc 14012371Sgabeblack@google.com mem/memory_interface.cc 14111983Sgabeblack@google.com mem/bus/base_interface.cc 1426143Snate@binkert.org mem/bus/bus.cc 1438233Snate@binkert.org mem/bus/bus_bridge.cc 14412302Sgabeblack@google.com mem/bus/bus_bridge_master.cc 1456143Snate@binkert.org mem/bus/bus_bridge_slave.cc 1466143Snate@binkert.org mem/bus/bus_interface.cc 14712302Sgabeblack@google.com mem/bus/dma_bus_interface.cc 1484762Snate@binkert.org mem/bus/dma_interface.cc 1496143Snate@binkert.org mem/bus/master_interface.cc 1508233Snate@binkert.org mem/bus/slave_interface.cc 1518233Snate@binkert.org mem/cache/base_cache.cc 15212302Sgabeblack@google.com mem/cache/cache.cc 15312302Sgabeblack@google.com mem/cache/cache_builder.cc 1546143Snate@binkert.org mem/cache/coherence/coherence_protocol.cc 15512362Sgabeblack@google.com mem/cache/coherence/uni_coherence.cc 15612362Sgabeblack@google.com mem/cache/miss/blocking_buffer.cc 15712362Sgabeblack@google.com mem/cache/miss/miss_queue.cc 15812362Sgabeblack@google.com mem/cache/miss/mshr.cc 15912302Sgabeblack@google.com mem/cache/miss/mshr_queue.cc 16012302Sgabeblack@google.com mem/cache/tags/base_tags.cc 16112302Sgabeblack@google.com mem/cache/tags/cache_tags.cc 16212302Sgabeblack@google.com mem/cache/tags/fa_lru.cc 16312302Sgabeblack@google.com mem/cache/tags/iic.cc 16412363Sgabeblack@google.com mem/cache/tags/lru.cc 16512363Sgabeblack@google.com mem/cache/tags/repl/gen.cc 16612363Sgabeblack@google.com mem/cache/tags/repl/repl.cc 16712363Sgabeblack@google.com mem/functional_mem/functional_memory.cc 16812302Sgabeblack@google.com mem/functional_mem/main_memory.cc 16912363Sgabeblack@google.com mem/timing_mem/base_memory.cc 17012363Sgabeblack@google.com mem/timing_mem/memory_builder.cc 17112363Sgabeblack@google.com mem/timing_mem/simple_mem_bank.cc 17212363Sgabeblack@google.com mem/trace/mem_trace_writer.cc 17312363Sgabeblack@google.com mem/trace/m5_writer.cc 1748233Snate@binkert.org 1756143Snate@binkert.org sim/builder.cc 1766143Snate@binkert.org sim/configfile.cc 1776143Snate@binkert.org sim/debug.cc 1786143Snate@binkert.org sim/eventq.cc 1796143Snate@binkert.org sim/main.cc 1806143Snate@binkert.org sim/param.cc 1816143Snate@binkert.org sim/profile.cc 1826143Snate@binkert.org sim/serialize.cc 1836143Snate@binkert.org sim/sim_events.cc 1847065Snate@binkert.org sim/sim_exit.cc 1856143Snate@binkert.org sim/sim_init.cc 18612362Sgabeblack@google.com sim/sim_object.cc 18712362Sgabeblack@google.com sim/stat_context.cc 18812362Sgabeblack@google.com sim/stat_control.cc 18912362Sgabeblack@google.com sim/sw_context.cc 19012362Sgabeblack@google.com sim/trace_context.cc 19112362Sgabeblack@google.com sim/universe.cc 19212362Sgabeblack@google.com ''') 19312362Sgabeblack@google.com 19412362Sgabeblack@google.com# MySql sources 19512362Sgabeblack@google.commysql_sources = Split(''' 19612362Sgabeblack@google.com base/mysql.cc 19712362Sgabeblack@google.com base/stats/mysql.cc 1988233Snate@binkert.org ''') 1998233Snate@binkert.org 2008233Snate@binkert.org# Full-system sources 2018233Snate@binkert.orgfull_system_sources = Split(''' 2028233Snate@binkert.org arch/alpha/alpha_memory.cc 2038233Snate@binkert.org arch/alpha/arguments.cc 2048233Snate@binkert.org arch/alpha/ev5.cc 2058233Snate@binkert.org arch/alpha/osfpal.cc 2068233Snate@binkert.org arch/alpha/pseudo_inst.cc 2078233Snate@binkert.org arch/alpha/vtophys.cc 2088233Snate@binkert.org 2098233Snate@binkert.org base/inet.cc 2108233Snate@binkert.org base/remote_gdb.cc 2118233Snate@binkert.org 2128233Snate@binkert.org cpu/intr_control.cc 2138233Snate@binkert.org 2148233Snate@binkert.org dev/alpha_console.cc 2158233Snate@binkert.org dev/baddev.cc 2168233Snate@binkert.org dev/simconsole.cc 2178233Snate@binkert.org dev/disk_image.cc 2188233Snate@binkert.org dev/dma.cc 2196143Snate@binkert.org dev/etherdump.cc 2206143Snate@binkert.org dev/etherint.cc 2216143Snate@binkert.org dev/etherlink.cc 2226143Snate@binkert.org dev/etherpkt.cc 2236143Snate@binkert.org dev/ethertap.cc 2246143Snate@binkert.org dev/ide_ctrl.cc 2259982Satgutier@umich.edu dev/ide_disk.cc 22613576Sciro.santilli@arm.com dev/io_device.cc 22713576Sciro.santilli@arm.com dev/ns_gige.cc 22813576Sciro.santilli@arm.com dev/etherdev.cc 22913576Sciro.santilli@arm.com dev/pciconfigall.cc 23013576Sciro.santilli@arm.com dev/pcidev.cc 23113576Sciro.santilli@arm.com dev/scsi.cc 23213576Sciro.santilli@arm.com dev/scsi_ctrl.cc 23313576Sciro.santilli@arm.com dev/scsi_disk.cc 23413576Sciro.santilli@arm.com dev/scsi_none.cc 23513576Sciro.santilli@arm.com dev/simple_disk.cc 23613576Sciro.santilli@arm.com dev/tlaser_clock.cc 23713576Sciro.santilli@arm.com dev/tlaser_ipi.cc 23813576Sciro.santilli@arm.com dev/tlaser_mbox.cc 23913576Sciro.santilli@arm.com dev/tlaser_mc146818.cc 24013576Sciro.santilli@arm.com dev/tlaser_node.cc 24113576Sciro.santilli@arm.com dev/tlaser_pcia.cc 24213576Sciro.santilli@arm.com dev/tlaser_pcidev.cc 24313576Sciro.santilli@arm.com dev/tlaser_serial.cc 24413576Sciro.santilli@arm.com dev/turbolaser.cc 24513576Sciro.santilli@arm.com dev/tsunami.cc 24613576Sciro.santilli@arm.com dev/tsunami_cchip.cc 24713576Sciro.santilli@arm.com dev/tsunami_fake.cc 24813576Sciro.santilli@arm.com dev/tsunami_io.cc 24913576Sciro.santilli@arm.com dev/tsunami_pchip.cc 25013576Sciro.santilli@arm.com dev/uart.cc 25113576Sciro.santilli@arm.com 25213576Sciro.santilli@arm.com kern/kernel_stats.cc 25313576Sciro.santilli@arm.com kern/system_events.cc 25413576Sciro.santilli@arm.com kern/linux/linux_events.cc 25513576Sciro.santilli@arm.com kern/linux/linux_syscalls.cc 25613576Sciro.santilli@arm.com kern/linux/linux_system.cc 25713576Sciro.santilli@arm.com kern/tru64/dump_mbuf.cc 25813630Sciro.santilli@arm.com kern/tru64/printf.cc 25913630Sciro.santilli@arm.com kern/tru64/tru64_events.cc 26013576Sciro.santilli@arm.com kern/tru64/tru64_syscalls.cc 26113576Sciro.santilli@arm.com kern/tru64/tru64_system.cc 26213576Sciro.santilli@arm.com 26313576Sciro.santilli@arm.com mem/functional_mem/memory_control.cc 26413576Sciro.santilli@arm.com mem/functional_mem/physical_memory.cc 26513576Sciro.santilli@arm.com dev/platform.cc 26613576Sciro.santilli@arm.com 26713576Sciro.santilli@arm.com sim/system.cc 26813576Sciro.santilli@arm.com ''') 26913576Sciro.santilli@arm.com 27013576Sciro.santilli@arm.com# Syscall emulation (non-full-system) sources 27113576Sciro.santilli@arm.comsyscall_emulation_sources = Split(''' 27213576Sciro.santilli@arm.com arch/alpha/alpha_common_syscall_emul.cc 27313576Sciro.santilli@arm.com arch/alpha/alpha_linux_process.cc 27413576Sciro.santilli@arm.com arch/alpha/alpha_tru64_process.cc 27513576Sciro.santilli@arm.com cpu/memtest/memtest.cc 27613576Sciro.santilli@arm.com cpu/trace/trace_cpu.cc 27713576Sciro.santilli@arm.com eio/eio.cc 27813576Sciro.santilli@arm.com eio/exolex.cc 27913576Sciro.santilli@arm.com eio/libexo.cc 28013576Sciro.santilli@arm.com sim/process.cc 28113576Sciro.santilli@arm.com sim/syscall_emul.cc 28213576Sciro.santilli@arm.com ''') 28313576Sciro.santilli@arm.com 28413576Sciro.santilli@arm.com# Set up complete list of sources based on configuration. 28513576Sciro.santilli@arm.comsources = base_sources 28613576Sciro.santilli@arm.com 28713576Sciro.santilli@arm.comif env['FULL_SYSTEM']: 28813576Sciro.santilli@arm.com sources += full_system_sources 28913576Sciro.santilli@arm.comelse: 29013576Sciro.santilli@arm.com sources += syscall_emulation_sources 29113576Sciro.santilli@arm.com 29213576Sciro.santilli@arm.comif env['USE_MYSQL']: 29313576Sciro.santilli@arm.com sources += mysql_sources 29413576Sciro.santilli@arm.com 29513576Sciro.santilli@arm.com################################################### 29613576Sciro.santilli@arm.com# 29713577Sciro.santilli@arm.com# Special build rules. 29813577Sciro.santilli@arm.com# 29913577Sciro.santilli@arm.com################################################### 3006143Snate@binkert.org 30112302Sgabeblack@google.com# base/traceflags.{cc,hh} are generated from base/traceflags.py. 30212302Sgabeblack@google.com# $TARGET.base will expand to "<build-dir>/base/traceflags". 30312302Sgabeblack@google.comenv.Command(Split('base/traceflags.hh base/traceflags.cc'), 30412302Sgabeblack@google.com 'base/traceflags.py', 30512302Sgabeblack@google.com 'python $SOURCE $TARGET.base') 30612302Sgabeblack@google.com 30712302Sgabeblack@google.com# several files are generated from arch/$TARGET_ISA/isa_desc. 30812302Sgabeblack@google.comenv.Command(Split('''arch/alpha/decoder.cc 30911983Sgabeblack@google.com arch/alpha/decoder.hh 31011983Sgabeblack@google.com arch/alpha/fast_cpu_exec.cc 31111983Sgabeblack@google.com arch/alpha/simple_cpu_exec.cc 31212302Sgabeblack@google.com arch/alpha/full_cpu_exec.cc'''), 31312302Sgabeblack@google.com 'arch/alpha/isa_desc', 31412302Sgabeblack@google.com '$SRCDIR/arch/isa_parser.py $SOURCE $TARGET.dir arch/alpha') 31512302Sgabeblack@google.com 31612302Sgabeblack@google.com 31712302Sgabeblack@google.com# 'targetarch' is a symlink to arch/$TARGET_ISA. 31811983Sgabeblack@google.comdef link_targetarch(target, source, env): 3196143Snate@binkert.org link_target = str(target[0]) 32012305Sgabeblack@google.com link_source = env.subst('$SRCDIR/arch/$TARGET_ISA') 32112302Sgabeblack@google.com if not os.path.isdir(link_target): 32212302Sgabeblack@google.com print "symlinking", link_source, "to", link_target 32312302Sgabeblack@google.com try: 3246143Snate@binkert.org os.symlink(link_source, link_target) 3256143Snate@binkert.org except OSError, desc: 3266143Snate@binkert.org print "Error creating symlink %s: %s" % (link_target, desc) 3275522Snate@binkert.org sys.exit(-1) 3286143Snate@binkert.org 3296143Snate@binkert.org# Tell SCons to use the link_targetarch function to make 'targetarch' 3306143Snate@binkert.orgenv.Command('targetarch', None, link_targetarch) 3319982Satgutier@umich.edu 33212302Sgabeblack@google.com 33312302Sgabeblack@google.com# This function adds the specified sources to the given build 33412302Sgabeblack@google.com# environment, and returns a list of all the corresponding SCons 3356143Snate@binkert.org# Object nodes (including an extra one for date.cc). We explicitly 3366143Snate@binkert.org# add the Object nodes so we can set up special dependencies for 3376143Snate@binkert.org# targetarch and date.cc. 3386143Snate@binkert.orgdef make_objs(sources, env): 3395522Snate@binkert.org objs = [env.Object(s) for s in sources] 3405522Snate@binkert.org # make all objects depend on the targetarch link so it gets made first. 3415522Snate@binkert.org env.Depends(objs, 'targetarch') 3425522Snate@binkert.org # make date.cc depend on all other objects so it always gets 3435604Snate@binkert.org # recompiled whenever anything else does 3445604Snate@binkert.org date_obj = env.Object('base/date.cc') 3456143Snate@binkert.org env.Depends(date_obj, objs) 3466143Snate@binkert.org objs.append(date_obj) 3474762Snate@binkert.org return objs 3484762Snate@binkert.org 3496143Snate@binkert.org################################################### 3506727Ssteve.reinhardt@amd.com# 3516727Ssteve.reinhardt@amd.com# Define binaries. Each different build type (debug, opt, etc.) gets 3526727Ssteve.reinhardt@amd.com# a slightly different build environment. 3534762Snate@binkert.org# 3546143Snate@binkert.org################################################### 3556143Snate@binkert.org 3566143Snate@binkert.org# Include file paths are rooted in this directory. SCons will 3576143Snate@binkert.org# automatically expand '.' to refer to both the source directory and 3586727Ssteve.reinhardt@amd.com# the corresponding build directory to pick up generated include 3596143Snate@binkert.org# files. 3607674Snate@binkert.orgenv.Append(CPPPATH='.') 3617674Snate@binkert.org 3625604Snate@binkert.org# Debug binary 3636143Snate@binkert.orgdebug = env.Copy(OBJSUFFIX='.do') 3646143Snate@binkert.orgdebug.Append(CCFLAGS=Split('-g -gstabs+ -O0')) 3656143Snate@binkert.orgdebug.Append(CPPDEFINES='DEBUG') 3664762Snate@binkert.orgdebug.Program(target = 'm5.debug', source = make_objs(sources, debug)) 3676143Snate@binkert.org 3684762Snate@binkert.org# Optimized binary 3694762Snate@binkert.orgopt = env.Copy() 3704762Snate@binkert.orgopt.Append(CCFLAGS=Split('-g -O5')) 3716143Snate@binkert.orgopt.Program(target = 'm5.opt', source = make_objs(sources, opt)) 3726143Snate@binkert.org 3734762Snate@binkert.org# "Fast" binary 37412302Sgabeblack@google.comfast = env.Copy(OBJSUFFIX='.fo') 37512302Sgabeblack@google.comfast.Append(CCFLAGS=Split('-O5')) 3768233Snate@binkert.orgfast.Append(CPPDEFINES='NDEBUG') 37712302Sgabeblack@google.comfast.Program(target = 'm5.fast.unstripped', source = make_objs(sources, fast)) 3786143Snate@binkert.orgfast.Command(target = 'm5.fast', source = 'm5.fast.unstripped', 3796143Snate@binkert.org action = 'strip $SOURCE -o $TARGET') 3804762Snate@binkert.org 3816143Snate@binkert.org# Profiled binary 3824762Snate@binkert.orgprof = env.Copy(OBJSUFFIX='.po') 3839396Sandreas.hansson@arm.comprof.Append(CCFLAGS=Split('-O5 -g -pg'), LINKFLAGS='-pg') 3849396Sandreas.hansson@arm.comprof.Program(target = 'm5.prof', source = make_objs(sources, prof)) 3859396Sandreas.hansson@arm.com