SConscript revision 2023
11689SN/A# -*- mode:python -*- 213601Sgiacomo.travaglini@arm.com 39916Ssteve.reinhardt@amd.com# Copyright (c) 2004-2005 The Regents of The University of Michigan 48707Sandreas.hansson@arm.com# All rights reserved. 58707Sandreas.hansson@arm.com# 68707Sandreas.hansson@arm.com# Redistribution and use in source and binary forms, with or without 78707Sandreas.hansson@arm.com# modification, are permitted provided that the following conditions are 88707Sandreas.hansson@arm.com# met: redistributions of source code must retain the above copyright 98707Sandreas.hansson@arm.com# notice, this list of conditions and the following disclaimer; 108707Sandreas.hansson@arm.com# redistributions in binary form must reproduce the above copyright 118707Sandreas.hansson@arm.com# notice, this list of conditions and the following disclaimer in the 128707Sandreas.hansson@arm.com# documentation and/or other materials provided with the distribution; 138707Sandreas.hansson@arm.com# neither the name of the copyright holders nor the names of its 148707Sandreas.hansson@arm.com# contributors may be used to endorse or promote products derived from 152325SN/A# this software without specific prior written permission. 167897Shestness@cs.utexas.edu# 171689SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 181689SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 191689SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 201689SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 211689SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 221689SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 231689SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 241689SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 251689SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 261689SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 271689SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 281689SN/A 291689SN/Aimport os 301689SN/Aimport sys 311689SN/Afrom os.path import isdir 321689SN/A 331689SN/A# This file defines how to build a particular configuration of M5 341689SN/A# based on variable settings in the 'env' build environment. 351689SN/A 361689SN/A# Import build environment variable from SConstruct. 371689SN/AImport('env') 381689SN/A 391689SN/A################################################### 401689SN/A# 412665Ssaidi@eecs.umich.edu# Define needed sources. 422665Ssaidi@eecs.umich.edu# 432756Sksewell@umich.edu################################################### 447897Shestness@cs.utexas.edu 451689SN/A# Base sources used by all configurations. 461689SN/A 4711793Sbrandon.potter@amd.combase_sources = Split(''' 4811793Sbrandon.potter@amd.com base/circlebuf.cc 4912109SRekai.GonzalezAlberquilla@arm.com base/copyright.cc 508779Sgblack@eecs.umich.edu base/cprintf.cc 516658Snate@binkert.org base/embedfile.cc 5211793Sbrandon.potter@amd.com base/fast_alloc.cc 538887Sgeoffrey.blake@arm.com base/fifo_buffer.cc 548887Sgeoffrey.blake@arm.com base/hostinfo.cc 558229Snate@binkert.org base/hybrid_pred.cc 568229Snate@binkert.org base/inifile.cc 578779Sgblack@eecs.umich.edu base/intmath.cc 584762Snate@binkert.org base/match.cc 594762Snate@binkert.org base/misc.cc 608232Snate@binkert.org base/output.cc 619152Satgutier@umich.edu base/pollevent.cc 628232Snate@binkert.org base/range.cc 638232Snate@binkert.org base/random.cc 644762Snate@binkert.org base/sat_counter.cc 654762Snate@binkert.org base/socket.cc 668793Sgblack@eecs.umich.edu base/statistics.cc 678779Sgblack@eecs.umich.edu base/str.cc 684762Snate@binkert.org base/time.cc 698460SAli.Saidi@ARM.com base/trace.cc 704762Snate@binkert.org base/traceflags.cc 715702Ssaidi@eecs.umich.edu base/userinfo.cc 725702Ssaidi@eecs.umich.edu base/compression/lzss_compression.cc 738232Snate@binkert.org base/loader/aout_object.cc 7411793Sbrandon.potter@amd.com base/loader/ecoff_object.cc 755702Ssaidi@eecs.umich.edu base/loader/elf_object.cc 765702Ssaidi@eecs.umich.edu base/loader/object_file.cc 778737Skoansin.tan@gmail.com base/loader/symtab.cc 785529Snate@binkert.org base/stats/events.cc 792669Sktlim@umich.edu base/stats/statdb.cc 806221Snate@binkert.org base/stats/visit.cc 811060SN/A base/stats/text.cc 825529Snate@binkert.org 835712Shsul@eecs.umich.edu cpu/base.cc 841060SN/A cpu/base_dyn_inst.cc 851060SN/A cpu/exec_context.cc 861060SN/A cpu/exetrace.cc 872292SN/A cpu/pc_event.cc 882733Sktlim@umich.edu cpu/static_inst.cc 892292SN/A cpu/o3/2bit_local_pred.cc 902292SN/A cpu/o3/alpha_dyn_inst.cc 912292SN/A cpu/o3/alpha_cpu.cc 922292SN/A cpu/o3/alpha_cpu_builder.cc 938707Sandreas.hansson@arm.com cpu/o3/bpred_unit.cc 948707Sandreas.hansson@arm.com cpu/o3/btb.cc 958975Sandreas.hansson@arm.com cpu/o3/commit.cc 968707Sandreas.hansson@arm.com cpu/o3/decode.cc 978707Sandreas.hansson@arm.com cpu/o3/fetch.cc 9811284Sandreas.hansson@arm.com cpu/o3/free_list.cc 9910821Sandreas.hansson@arm.com cpu/o3/cpu.cc 10011284Sandreas.hansson@arm.com cpu/o3/iew.cc 1018948Sandreas.hansson@arm.com cpu/o3/inst_queue.cc 1028707Sandreas.hansson@arm.com cpu/o3/ldstq.cc 1038707Sandreas.hansson@arm.com cpu/o3/mem_dep_unit.cc 1048707Sandreas.hansson@arm.com cpu/o3/ras.cc 1058707Sandreas.hansson@arm.com cpu/o3/rename.cc 1068707Sandreas.hansson@arm.com cpu/o3/rename_map.cc 1078707Sandreas.hansson@arm.com cpu/o3/rob.cc 10810713Sandreas.hansson@arm.com cpu/o3/sat_counter.cc 1098707Sandreas.hansson@arm.com cpu/o3/store_set.cc 11010713Sandreas.hansson@arm.com cpu/o3/tournament_pred.cc 1118707Sandreas.hansson@arm.com cpu/fast/cpu.cc 1128707Sandreas.hansson@arm.com cpu/sampler/sampler.cc 1138707Sandreas.hansson@arm.com cpu/simple/cpu.cc 1148707Sandreas.hansson@arm.com cpu/trace/reader/mem_trace_reader.cc 1158975Sandreas.hansson@arm.com cpu/trace/reader/ibm_reader.cc 1168707Sandreas.hansson@arm.com cpu/trace/reader/itx_reader.cc 1178975Sandreas.hansson@arm.com cpu/trace/reader/m5_reader.cc 1188707Sandreas.hansson@arm.com cpu/trace/opt_cpu.cc 1198707Sandreas.hansson@arm.com cpu/trace/trace_cpu.cc 1208707Sandreas.hansson@arm.com 1218975Sandreas.hansson@arm.com encumbered/cpu/full/bpred.cc 1228975Sandreas.hansson@arm.com encumbered/cpu/full/commit.cc 1238948Sandreas.hansson@arm.com encumbered/cpu/full/cpu.cc 12411148Smitch.hayenga@arm.com encumbered/cpu/full/create_vector.cc 12511148Smitch.hayenga@arm.com encumbered/cpu/full/cv_spec_state.cc 12611151Smitch.hayenga@arm.com encumbered/cpu/full/dd_queue.cc 12711148Smitch.hayenga@arm.com encumbered/cpu/full/dep_link.cc 12810529Smorr@cs.wisc.edu encumbered/cpu/full/dispatch.cc 1298975Sandreas.hansson@arm.com encumbered/cpu/full/dyn_inst.cc 1308948Sandreas.hansson@arm.com encumbered/cpu/full/execute.cc 1318948Sandreas.hansson@arm.com encumbered/cpu/full/fetch.cc 1328948Sandreas.hansson@arm.com encumbered/cpu/full/floss_reasons.cc 1338707Sandreas.hansson@arm.com encumbered/cpu/full/fu_pool.cc 13410713Sandreas.hansson@arm.com encumbered/cpu/full/inst_fifo.cc 1358707Sandreas.hansson@arm.com encumbered/cpu/full/instpipe.cc 13610713Sandreas.hansson@arm.com encumbered/cpu/full/issue.cc 1378707Sandreas.hansson@arm.com encumbered/cpu/full/ls_queue.cc 1388707Sandreas.hansson@arm.com encumbered/cpu/full/machine_queue.cc 1391060SN/A encumbered/cpu/full/pipetrace.cc 1405595Sgblack@eecs.umich.edu encumbered/cpu/full/readyq.cc 1412733Sktlim@umich.edu encumbered/cpu/full/reg_info.cc 1423781Sgblack@eecs.umich.edu encumbered/cpu/full/rob_station.cc 1433781Sgblack@eecs.umich.edu encumbered/cpu/full/spec_memory.cc 14412127Sspwilson2@wisc.edu encumbered/cpu/full/spec_state.cc 14512127Sspwilson2@wisc.edu encumbered/cpu/full/storebuffer.cc 14613641Sqtt2@cornell.edu encumbered/cpu/full/writeback.cc 14713641Sqtt2@cornell.edu encumbered/cpu/full/iq/iq_station.cc 1485737Scws3k@cs.virginia.edu encumbered/cpu/full/iq/iqueue.cc 1495737Scws3k@cs.virginia.edu encumbered/cpu/full/iq/segmented/chain_info.cc 1505737Scws3k@cs.virginia.edu encumbered/cpu/full/iq/segmented/chain_wire.cc 1512292SN/A encumbered/cpu/full/iq/segmented/iq_seg.cc 1525595Sgblack@eecs.umich.edu encumbered/cpu/full/iq/segmented/iq_segmented.cc 1535595Sgblack@eecs.umich.edu encumbered/cpu/full/iq/segmented/seg_chain.cc 1545595Sgblack@eecs.umich.edu encumbered/cpu/full/iq/seznec/iq_seznec.cc 1555595Sgblack@eecs.umich.edu encumbered/cpu/full/iq/standard/iq_standard.cc 1565595Sgblack@eecs.umich.edu encumbered/mem/functional/main.cc 1571060SN/A 15812109SRekai.GonzalezAlberquilla@arm.com mem/base_hier.cc 15912109SRekai.GonzalezAlberquilla@arm.com mem/base_mem.cc 16013601Sgiacomo.travaglini@arm.com mem/hier_params.cc 1619915Ssteve.reinhardt@amd.com mem/mem_cmd.cc 1629920Syasuko.eckert@amd.com mem/mem_debug.cc 16312109SRekai.GonzalezAlberquilla@arm.com mem/mem_req.cc 16413610Sgiacomo.gabrielli@arm.com mem/memory_interface.cc 16512109SRekai.GonzalezAlberquilla@arm.com mem/bus/base_interface.cc 16612109SRekai.GonzalezAlberquilla@arm.com mem/bus/bus.cc 1671060SN/A mem/bus/bus_bridge.cc 1689919Ssteve.reinhardt@amd.com mem/bus/bus_bridge_master.cc 1691060SN/A mem/bus/bus_bridge_slave.cc 1709954SFaissal.Sleiman@arm.com mem/bus/bus_interface.cc 1711060SN/A mem/bus/dma_bus_interface.cc 1729916Ssteve.reinhardt@amd.com mem/bus/dma_interface.cc 17312105Snathanael.premillieu@arm.com mem/bus/master_interface.cc 1741060SN/A mem/bus/slave_interface.cc 1759384SAndreas.Sandberg@arm.com mem/cache/base_cache.cc 1769384SAndreas.Sandberg@arm.com mem/cache/cache.cc 1778707Sandreas.hansson@arm.com mem/cache/cache_builder.cc 1788707Sandreas.hansson@arm.com mem/cache/coherence/coherence_protocol.cc 1798707Sandreas.hansson@arm.com mem/cache/coherence/uni_coherence.cc 1802873Sktlim@umich.edu mem/cache/miss/blocking_buffer.cc 1812873Sktlim@umich.edu mem/cache/miss/miss_queue.cc 1822873Sktlim@umich.edu mem/cache/miss/mshr.cc 1832873Sktlim@umich.edu mem/cache/miss/mshr_queue.cc 1842873Sktlim@umich.edu mem/cache/prefetch/base_prefetcher.cc 1855804Snate@binkert.org mem/cache/prefetch/prefetcher.cc 1862873Sktlim@umich.edu mem/cache/prefetch/tagged_prefetcher.cc 1872873Sktlim@umich.edu mem/cache/tags/base_tags.cc 1881060SN/A mem/cache/tags/cache_tags.cc 1891060SN/A mem/cache/tags/fa_lru.cc 1902292SN/A mem/cache/tags/iic.cc 1919180Sandreas.hansson@arm.com mem/cache/tags/lru.cc 1921060SN/A mem/cache/tags/repl/gen.cc 1939433SAndreas.Sandberg@ARM.com mem/cache/tags/repl/repl.cc 1943221Sktlim@umich.edu mem/cache/tags/split.cc 1953221Sktlim@umich.edu mem/cache/tags/split_lru.cc 1969152Satgutier@umich.edu mem/cache/tags/split_lifo.cc 1973221Sktlim@umich.edu mem/functional/functional.cc 1981681SN/A mem/timing/base_memory.cc 1992794Sktlim@umich.edu mem/timing/memory_builder.cc 2002316SN/A mem/timing/simple_mem_bank.cc 2018733Sgeoffrey.blake@arm.com mem/trace/itx_writer.cc 2028707Sandreas.hansson@arm.com mem/trace/mem_trace_writer.cc 2032316SN/A mem/trace/m5_writer.cc 2044598Sbinkertn@umich.edu 2054598Sbinkertn@umich.edu python/pyconfig.cc 2064598Sbinkertn@umich.edu python/embedded_py.cc 2072316SN/A 2088793Sgblack@eecs.umich.edu sim/builder.cc 2098793Sgblack@eecs.umich.edu sim/configfile.cc 2108793Sgblack@eecs.umich.edu sim/debug.cc 2118793Sgblack@eecs.umich.edu sim/eventq.cc 2121681SN/A sim/main.cc 2132325SN/A sim/param.cc 2142325SN/A sim/profile.cc 2152325SN/A sim/root.cc 2161060SN/A sim/serialize.cc 2172292SN/A sim/sim_events.cc 2182292SN/A sim/sim_exit.cc 2192292SN/A sim/sim_object.cc 2202292SN/A sim/startup.cc 2212292SN/A sim/stat_context.cc 2222292SN/A sim/stat_control.cc 2231060SN/A sim/trace_context.cc 2241060SN/A ''') 2251060SN/A# These are now included by the architecture specific SConscript 2261060SN/A# arch/alpha/decoder.cc 2271060SN/A# arch/alpha/alpha_o3_exec.cc 2281060SN/A# arch/alpha/fast_cpu_exec.cc 2291060SN/A# arch/alpha/simple_cpu_exec.cc 2301060SN/A# arch/alpha/full_cpu_exec.cc 2311060SN/A# arch/alpha/faults.cc 2321060SN/A# arch/alpha/isa_traits.cc 2331060SN/A 2342292SN/A# MySql sources 2351060SN/Amysql_sources = Split(''' 2361060SN/A base/mysql.cc 2371060SN/A base/stats/mysql.cc 2381060SN/A ''') 2391060SN/A 2401060SN/A# Full-system sources 2411060SN/Afull_system_sources = Split(''' 2421060SN/A base/crc.cc 2432292SN/A base/inet.cc 2442292SN/A base/remote_gdb.cc 2452292SN/A 2462292SN/A cpu/intr_control.cc 2478793Sgblack@eecs.umich.edu cpu/profile.cc 2488793Sgblack@eecs.umich.edu 2498793Sgblack@eecs.umich.edu dev/alpha_console.cc 2508793Sgblack@eecs.umich.edu dev/baddev.cc 2518793Sgblack@eecs.umich.edu dev/simconsole.cc 2522831Sksewell@umich.edu dev/disk_image.cc 2538793Sgblack@eecs.umich.edu dev/etherbus.cc 2548793Sgblack@eecs.umich.edu dev/etherdump.cc 2558793Sgblack@eecs.umich.edu dev/etherint.cc 2568793Sgblack@eecs.umich.edu dev/etherlink.cc 2578793Sgblack@eecs.umich.edu dev/etherpkt.cc 2582831Sksewell@umich.edu dev/ethertap.cc 2592292SN/A dev/ide_ctrl.cc 2602316SN/A dev/ide_disk.cc 2612292SN/A dev/io_device.cc 2622292SN/A dev/ns_gige.cc 26312109SRekai.GonzalezAlberquilla@arm.com dev/pciconfigall.cc 26413610Sgiacomo.gabrielli@arm.com dev/pcidev.cc 2659920Syasuko.eckert@amd.com dev/pcifake.cc 2662292SN/A dev/pktfifo.cc 2672292SN/A dev/platform.cc 2682292SN/A dev/sinic.cc 2692292SN/A dev/simple_disk.cc 2701060SN/A dev/tsunami.cc 2716221Snate@binkert.org dev/tsunami_cchip.cc 2729384SAndreas.Sandberg@arm.com dev/isa_fake.cc 27313601Sgiacomo.travaglini@arm.com dev/tsunami_io.cc 2749384SAndreas.Sandberg@arm.com dev/tsunami_pchip.cc 2759919Ssteve.reinhardt@amd.com dev/uart.cc 2769919Ssteve.reinhardt@amd.com dev/uart8250.cc 2779919Ssteve.reinhardt@amd.com 2789919Ssteve.reinhardt@amd.com kern/kernel_binning.cc 2799919Ssteve.reinhardt@amd.com kern/kernel_stats.cc 2809919Ssteve.reinhardt@amd.com kern/system_events.cc 2812292SN/A kern/freebsd/freebsd_system.cc 2829919Ssteve.reinhardt@amd.com kern/linux/linux_syscalls.cc 28312109SRekai.GonzalezAlberquilla@arm.com kern/linux/linux_system.cc 28412109SRekai.GonzalezAlberquilla@arm.com kern/linux/printk.cc 2852292SN/A kern/tru64/dump_mbuf.cc 2869919Ssteve.reinhardt@amd.com kern/tru64/printf.cc 28712109SRekai.GonzalezAlberquilla@arm.com kern/tru64/tru64_events.cc 2882292SN/A kern/tru64/tru64_syscalls.cc 2892292SN/A kern/tru64/tru64_system.cc 2909919Ssteve.reinhardt@amd.com 2919919Ssteve.reinhardt@amd.com mem/functional/memory_control.cc 2929919Ssteve.reinhardt@amd.com mem/functional/physical.cc 2939919Ssteve.reinhardt@amd.com 2949919Ssteve.reinhardt@amd.com sim/system.cc 2959919Ssteve.reinhardt@amd.com ''') 29612105Snathanael.premillieu@arm.com 29712106SRekai.GonzalezAlberquilla@arm.com# These are now included by the architecture specific SConscript 29812106SRekai.GonzalezAlberquilla@arm.com# arch/alpha/alpha_memory.cc 2999919Ssteve.reinhardt@amd.com# arch/alpha/arguments.cc 3009919Ssteve.reinhardt@amd.com# arch/alpha/ev5.cc 3019919Ssteve.reinhardt@amd.com# arch/alpha/osfpal.cc 30212105Snathanael.premillieu@arm.com# arch/alpha/pseudo_inst.cc 30312106SRekai.GonzalezAlberquilla@arm.com# arch/alpha/stacktrace.cc 30412106SRekai.GonzalezAlberquilla@arm.com# arch/alpha/vtophys.cc 30512106SRekai.GonzalezAlberquilla@arm.com 3069919Ssteve.reinhardt@amd.com# turbolaser encumbered sources 3079920Syasuko.eckert@amd.comturbolaser_sources = Split(''' 30812109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/dma.cc 30912109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/etherdev.cc 31012109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/scsi.cc 31112109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/scsi_ctrl.cc 31212109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/scsi_disk.cc 31312109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/scsi_none.cc 31412109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/tlaser_clock.cc 31512109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/tlaser_ipi.cc 31612109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/tlaser_mbox.cc 31712109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/tlaser_mc146818.cc 31812109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/tlaser_node.cc 31912109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/tlaser_pcia.cc 32012109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/tlaser_pcidev.cc 32112109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/tlaser_serial.cc 32212109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/turbolaser.cc 32312109SRekai.GonzalezAlberquilla@arm.com encumbered/dev/uart8530.cc 32412109SRekai.GonzalezAlberquilla@arm.com ''') 32512109SRekai.GonzalezAlberquilla@arm.com 32612109SRekai.GonzalezAlberquilla@arm.com# Syscall emulation (non-full-system) sources 32712109SRekai.GonzalezAlberquilla@arm.comsyscall_emulation_sources = Split(''' 32812109SRekai.GonzalezAlberquilla@arm.com cpu/memtest/memtest.cc 32912109SRekai.GonzalezAlberquilla@arm.com encumbered/eio/eio.cc 33012109SRekai.GonzalezAlberquilla@arm.com encumbered/eio/exolex.cc 33112109SRekai.GonzalezAlberquilla@arm.com encumbered/eio/libexo.cc 33213610Sgiacomo.gabrielli@arm.com sim/process.cc 33313610Sgiacomo.gabrielli@arm.com sim/syscall_emul.cc 33413610Sgiacomo.gabrielli@arm.com ''') 33513610Sgiacomo.gabrielli@arm.com 33613610Sgiacomo.gabrielli@arm.com# These are now included by the architecture specific SConscript 33713610Sgiacomo.gabrielli@arm.com# arch/alpha/alpha_common_syscall_emul.cc 33813610Sgiacomo.gabrielli@arm.com# arch/alpha/alpha_linux_process.cc 3399920Syasuko.eckert@amd.com# arch/alpha/alpha_tru64_process.cc 34012105Snathanael.premillieu@arm.com 34112106SRekai.GonzalezAlberquilla@arm.comtargetarch_files = Split(''' 34212106SRekai.GonzalezAlberquilla@arm.com alpha_common_syscall_emul.hh 3439920Syasuko.eckert@amd.com alpha_linux_process.hh 3449919Ssteve.reinhardt@amd.com alpha_memory.hh 3459919Ssteve.reinhardt@amd.com alpha_tru64_process.hh 3462292SN/A aout_machdep.h 3472292SN/A arguments.hh 3481060SN/A byte_swap.hh 3492292SN/A ecoff_machdep.h 3501060SN/A ev5.hh 3511060SN/A faults.hh 3522292SN/A isa_fullsys_traits.hh 3539158Sandreas.hansson@arm.com isa_traits.hh 3546221Snate@binkert.org osfpal.hh 3553093Sksewell@umich.edu pseudo_inst.hh 3566221Snate@binkert.org stacktrace.hh 3576221Snate@binkert.org vptr.hh 3586221Snate@binkert.org vtophys.hh 3593093Sksewell@umich.edu ''') 3605595Sgblack@eecs.umich.edu 3615595Sgblack@eecs.umich.edu# Set up bridging headers to the architecture specific versions 3625595Sgblack@eecs.umich.edufor f in targetarch_files: 3635595Sgblack@eecs.umich.edu env.Command('targetarch/' + f, 'arch/%s/%s' % (env['TARGET_ISA'], f), 3645595Sgblack@eecs.umich.edu '''echo '#include "arch/%s/%s"' > $TARGET''' % (env['TARGET_ISA'], f)) 3656221Snate@binkert.org 3668793Sgblack@eecs.umich.edu# Let the target architecture define what sources it needs 3678793Sgblack@eecs.umich.eduarch_source = SConscript('arch/%s/SConscript' % env['TARGET_ISA'], 3688793Sgblack@eecs.umich.edu build_dir = 'build/%s/' % env['BUILD_DIR'], 3698793Sgblack@eecs.umich.edu exports = 'env', duplicate = False) 3708793Sgblack@eecs.umich.edu 3718793Sgblack@eecs.umich.edu# Set up complete list of sources based on configuration. 3728793Sgblack@eecs.umich.edusources = base_sources + arch_source 3738793Sgblack@eecs.umich.edu 3748793Sgblack@eecs.umich.eduif env['FULL_SYSTEM']: 3758793Sgblack@eecs.umich.edu sources += full_system_sources 3768793Sgblack@eecs.umich.edu if env['ALPHA_TLASER']: 3775595Sgblack@eecs.umich.edu sources += turbolaser_sources 3788793Sgblack@eecs.umich.eduelse: 3798793Sgblack@eecs.umich.edu sources += syscall_emulation_sources 3808793Sgblack@eecs.umich.edu 3818793Sgblack@eecs.umich.eduif env['USE_MYSQL']: 3828793Sgblack@eecs.umich.edu sources += mysql_sources 3838793Sgblack@eecs.umich.edu 3845595Sgblack@eecs.umich.edufor opt in env.ExportOptions: 3858793Sgblack@eecs.umich.edu env.ConfigFile(opt) 3868793Sgblack@eecs.umich.edu 3878793Sgblack@eecs.umich.edu################################################### 3888793Sgblack@eecs.umich.edu# 3898793Sgblack@eecs.umich.edu# Special build rules. 3905595Sgblack@eecs.umich.edu# 3915595Sgblack@eecs.umich.edu################################################### 3925595Sgblack@eecs.umich.edu 3935595Sgblack@eecs.umich.edu# base/traceflags.{cc,hh} are generated from base/traceflags.py. 3945595Sgblack@eecs.umich.edu# $TARGET.base will expand to "<build-dir>/base/traceflags". 3955595Sgblack@eecs.umich.eduenv.Command(Split('base/traceflags.hh base/traceflags.cc'), 3965595Sgblack@eecs.umich.edu 'base/traceflags.py', 3975595Sgblack@eecs.umich.edu 'python $SOURCE $TARGET.base') 3985595Sgblack@eecs.umich.edu 3995595Sgblack@eecs.umich.edu# several files are generated from arch/$TARGET_ISA/isa_desc. 4005595Sgblack@eecs.umich.eduenv.Command(Split(''' 4015595Sgblack@eecs.umich.edu arch/%s/decoder.cc 4025595Sgblack@eecs.umich.edu arch/%s/decoder.hh 4035595Sgblack@eecs.umich.edu arch/%s/alpha_o3_exec.cc 4045595Sgblack@eecs.umich.edu arch/%s/fast_cpu_exec.cc 4055595Sgblack@eecs.umich.edu arch/%s/simple_cpu_exec.cc 4065595Sgblack@eecs.umich.edu arch/%s/full_cpu_exec.cc''' % 4075595Sgblack@eecs.umich.edu (env['TARGET_ISA'], 4086221Snate@binkert.org env['TARGET_ISA'], 4095595Sgblack@eecs.umich.edu env['TARGET_ISA'], 41011627Smichael.lebeane@amd.com env['TARGET_ISA'], 41111627Smichael.lebeane@amd.com env['TARGET_ISA'], 41211627Smichael.lebeane@amd.com env['TARGET_ISA'])), 4135595Sgblack@eecs.umich.edu Split(''' 4146221Snate@binkert.org arch/%s/isa_desc 4155595Sgblack@eecs.umich.edu arch/isa_parser.py''' % 4165595Sgblack@eecs.umich.edu env['TARGET_ISA']), 4175595Sgblack@eecs.umich.edu '$SRCDIR/arch/isa_parser.py $SOURCE $TARGET.dir arch/%s' % env['TARGET_ISA']) 4185595Sgblack@eecs.umich.edu 4195595Sgblack@eecs.umich.edu 4208876Sandreas.hansson@arm.com# libelf build is described in its own SConscript file. 42111150Smitch.hayenga@arm.com# SConscript-local is the per-config build, which just copies some 4228876Sandreas.hansson@arm.com# header files into a place where they can be found. 4238876Sandreas.hansson@arm.comSConscript('libelf/SConscript-local', exports = 'env', duplicate=0) 4248876Sandreas.hansson@arm.comSConscript('python/SConscript', exports = ['env'], duplicate=0) 4258876Sandreas.hansson@arm.com 4266221Snate@binkert.org# This function adds the specified sources to the given build 4276221Snate@binkert.org# environment, and returns a list of all the corresponding SCons 4281060SN/A# Object nodes (including an extra one for date.cc). We explicitly 4291060SN/A# add the Object nodes so we can set up special dependencies for 4301060SN/A# date.cc. 4311755SN/Adef make_objs(sources, env): 4321060SN/A objs = [env.Object(s) for s in sources] 4331060SN/A # make date.cc depend on all other objects so it always gets 4341060SN/A # recompiled whenever anything else does 4351060SN/A date_obj = env.Object('base/date.cc') 4361060SN/A env.Depends(date_obj, objs) 43710023Smatt.horsnell@ARM.com objs.append(date_obj) 43810023Smatt.horsnell@ARM.com return objs 43910464SAndreas.Sandberg@ARM.com 44010464SAndreas.Sandberg@ARM.com################################################### 44110023Smatt.horsnell@ARM.com# 44210023Smatt.horsnell@ARM.com# Define binaries. Each different build type (debug, opt, etc.) gets 44310464SAndreas.Sandberg@ARM.com# a slightly different build environment. 44410023Smatt.horsnell@ARM.com# 44511246Sradhika.jagtap@ARM.com################################################### 44610023Smatt.horsnell@ARM.com 44710023Smatt.horsnell@ARM.com# Include file paths are rooted in this directory. SCons will 44810023Smatt.horsnell@ARM.com# automatically expand '.' to refer to both the source directory and 44910023Smatt.horsnell@ARM.com# the corresponding build directory to pick up generated include 45010023Smatt.horsnell@ARM.com# files. 45110023Smatt.horsnell@ARM.comenv.Append(CPPPATH='.') 4525595Sgblack@eecs.umich.edu 4531062SN/A# Debug binary 4542733Sktlim@umich.edudebugEnv = env.Copy(OBJSUFFIX='.do') 4552292SN/AdebugEnv.Label = 'debug' 4562733Sktlim@umich.edudebugEnv.Append(CCFLAGS=Split('-g -gstabs+ -O0')) 4572292SN/AdebugEnv.Append(CPPDEFINES='DEBUG') 4582292SN/Atlist = debugEnv.Program(target = 'm5.debug', 4592292SN/A source = make_objs(sources, debugEnv)) 4602292SN/AdebugEnv.M5Binary = tlist[0] 4612292SN/A 4622292SN/A# Optimized binary 4632292SN/AoptEnv = env.Copy() 4642292SN/AoptEnv.Label = 'opt' 4652292SN/AoptEnv.Append(CCFLAGS=Split('-g -O5')) 4662292SN/Atlist = optEnv.Program(target = 'm5.opt', 4672292SN/A source = make_objs(sources, optEnv)) 4682292SN/AoptEnv.M5Binary = tlist[0] 4698627SAli.Saidi@ARM.com 4708627SAli.Saidi@ARM.com# "Fast" binary 4718627SAli.Saidi@ARM.comfastEnv = env.Copy(OBJSUFFIX='.fo') 4728627SAli.Saidi@ARM.comfastEnv.Label = 'fast' 4738627SAli.Saidi@ARM.comfastEnv.Append(CCFLAGS=Split('-O5')) 4748627SAli.Saidi@ARM.comfastEnv.Append(CPPDEFINES='NDEBUG') 4752292SN/AfastEnv.Program(target = 'm5.fast.unstripped', 4762292SN/A source = make_objs(sources, fastEnv)) 4772292SN/Atlist = fastEnv.Command(target = 'm5.fast', 4782292SN/A source = 'm5.fast.unstripped', 4792292SN/A action = 'strip $SOURCE -o $TARGET') 4802292SN/AfastEnv.M5Binary = tlist[0] 4812292SN/A 48210225Snilay@cs.wisc.edu# Profiled binary 48310225Snilay@cs.wisc.eduprofEnv = env.Copy(OBJSUFFIX='.po') 4842292SN/AprofEnv.Label = 'prof' 4858834Satgutier@umich.eduprofEnv.Append(CCFLAGS=Split('-O5 -g -pg'), LINKFLAGS='-pg') 4868834Satgutier@umich.edutlist = profEnv.Program(target = 'm5.prof', 4878834Satgutier@umich.edu source = make_objs(sources, profEnv)) 48810225Snilay@cs.wisc.eduprofEnv.M5Binary = tlist[0] 48910225Snilay@cs.wisc.edu 4902292SN/AenvList = [debugEnv, optEnv, fastEnv, profEnv] 4912292SN/A 4922292SN/AReturn('envList') 4932292SN/A