summaryrefslogtreecommitdiff
path: root/src/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'src/SConscript')
-rw-r--r--src/SConscript137
1 files changed, 25 insertions, 112 deletions
diff --git a/src/SConscript b/src/SConscript
index 28f39bc29..44bcb5320 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -30,7 +30,7 @@
import os
import sys
-from os.path import isdir
+from os.path import isfile, join as joinpath
# This file defines how to build a particular configuration of M5
# based on variable settings in the 'env' build environment.
@@ -74,6 +74,7 @@ base_sources = Split('''
base/loader/aout_object.cc
base/loader/ecoff_object.cc
base/loader/elf_object.cc
+ base/loader/raw_object.cc
base/loader/object_file.cc
base/loader/symtab.cc
base/stats/events.cc
@@ -146,45 +147,6 @@ base_sources = Split('''
sim/trace_context.cc
''')
-# Old FullCPU sources
-full_cpu_sources = Split('''
- encumbered/cpu/full/bpred.cc
- encumbered/cpu/full/commit.cc
- encumbered/cpu/full/cpu.cc
- encumbered/cpu/full/create_vector.cc
- encumbered/cpu/full/cv_spec_state.cc
- encumbered/cpu/full/dd_queue.cc
- encumbered/cpu/full/dep_link.cc
- encumbered/cpu/full/dispatch.cc
- encumbered/cpu/full/dyn_inst.cc
- encumbered/cpu/full/execute.cc
- encumbered/cpu/full/fetch.cc
- encumbered/cpu/full/floss_reasons.cc
- encumbered/cpu/full/fu_pool.cc
- encumbered/cpu/full/inst_fifo.cc
- encumbered/cpu/full/instpipe.cc
- encumbered/cpu/full/issue.cc
- encumbered/cpu/full/ls_queue.cc
- encumbered/cpu/full/machine_queue.cc
- encumbered/cpu/full/pipetrace.cc
- encumbered/cpu/full/readyq.cc
- encumbered/cpu/full/reg_info.cc
- encumbered/cpu/full/rob_station.cc
- encumbered/cpu/full/spec_memory.cc
- encumbered/cpu/full/spec_state.cc
- encumbered/cpu/full/storebuffer.cc
- encumbered/cpu/full/writeback.cc
- encumbered/cpu/full/iq/iq_station.cc
- encumbered/cpu/full/iq/iqueue.cc
- encumbered/cpu/full/iq/segmented/chain_info.cc
- encumbered/cpu/full/iq/segmented/chain_wire.cc
- encumbered/cpu/full/iq/segmented/iq_seg.cc
- encumbered/cpu/full/iq/segmented/iq_segmented.cc
- encumbered/cpu/full/iq/segmented/seg_chain.cc
- encumbered/cpu/full/iq/seznec/iq_seznec.cc
- encumbered/cpu/full/iq/standard/iq_standard.cc
- ''')
-
trace_reader_sources = Split('''
cpu/trace/reader/mem_trace_reader.cc
cpu/trace/reader/ibm_reader.cc
@@ -211,42 +173,9 @@ full_system_sources = Split('''
cpu/intr_control.cc
cpu/profile.cc
- dev/alpha_console.cc
- dev/baddev.cc
- dev/disk_image.cc
- dev/etherbus.cc
- dev/etherdump.cc
- dev/etherint.cc
- dev/etherlink.cc
- dev/etherpkt.cc
- dev/ethertap.cc
- dev/ide_ctrl.cc
- dev/ide_disk.cc
- dev/io_device.cc
- dev/isa_fake.cc
- dev/ns_gige.cc
- dev/pciconfigall.cc
- dev/pcidev.cc
- dev/pcifake.cc
- dev/pktfifo.cc
- dev/platform.cc
- dev/simconsole.cc
- dev/simple_disk.cc
- dev/tsunami.cc
- dev/tsunami_cchip.cc
- dev/tsunami_io.cc
- dev/tsunami_fake.cc
- dev/tsunami_pchip.cc
-
dev/uart.cc
dev/uart8250.cc
- kern/kernel_stats.cc
- kern/system_events.cc
- kern/linux/events.cc
- kern/linux/linux_syscalls.cc
- kern/linux/printk.cc
-
mem/vport.cc
sim/pseudo_inst.cc
@@ -254,7 +183,6 @@ full_system_sources = Split('''
#dev/sinic.cc
#dev/i8254xGBe.cc
-
if env['TARGET_ISA'] == 'alpha':
full_system_sources += Split('''
kern/tru64/dump_mbuf.cc
@@ -263,26 +191,6 @@ if env['TARGET_ISA'] == 'alpha':
kern/tru64/tru64_syscalls.cc
''')
-# turbolaser encumbered sources
-turbolaser_sources = Split('''
- encumbered/dev/dma.cc
- encumbered/dev/etherdev.cc
- encumbered/dev/scsi.cc
- encumbered/dev/scsi_ctrl.cc
- encumbered/dev/scsi_disk.cc
- encumbered/dev/scsi_none.cc
- encumbered/dev/tlaser_clock.cc
- encumbered/dev/tlaser_ipi.cc
- encumbered/dev/tlaser_mbox.cc
- encumbered/dev/tlaser_mc146818.cc
- encumbered/dev/tlaser_node.cc
- encumbered/dev/tlaser_pcia.cc
- encumbered/dev/tlaser_pcidev.cc
- encumbered/dev/tlaser_serial.cc
- encumbered/dev/turbolaser.cc
- encumbered/dev/uart8530.cc
- ''')
-
# Syscall emulation (non-full-system) sources
syscall_emulation_sources = Split('''
mem/translating_port.cc
@@ -296,15 +204,6 @@ syscall_emulation_sources = Split('''
# kern/tru64/tru64.cc
# ''')
-alpha_eio_sources = Split('''
- encumbered/eio/exolex.cc
- encumbered/eio/libexo.cc
- encumbered/eio/eio.cc
- ''')
-
-if env['TARGET_ISA'] == 'alpha':
- syscall_emulation_sources += alpha_eio_sources
-
memtest_sources = Split('''
cpu/memtest/memtest.cc
''')
@@ -318,22 +217,29 @@ env.Append(CPPPATH=Dir('.'))
# Add a flag defining what THE_ISA should be for all compilation
env.Append(CPPDEFINES=[('THE_ISA','%s_ISA' % env['TARGET_ISA'].upper())])
-arch_sources = SConscript('arch/SConscript', exports = 'env')
+arch_sources = SConscript(os.path.join('arch', 'SConscript'), exports = 'env')
-cpu_sources = SConscript('cpu/SConscript', exports = 'env')
+cpu_sources = SConscript(os.path.join('cpu', 'SConscript'), exports = 'env')
+
+if env['FULL_SYSTEM']:
+ dev_sources = SConscript(os.path.join('dev', 'SConscript'),
+ exports = 'env')
+ full_system_sources += dev_sources
-# This is outside of cpu/SConscript since the source directory isn't
-# underneath 'cpu'.
-if 'FullCPU' in env['CPU_MODELS']:
- cpu_sources += full_cpu_sources
+ kern_sources = SConscript(os.path.join('kern', 'SConscript'),
+ exports = 'env')
+ full_system_sources += kern_sources
# Set up complete list of sources based on configuration.
sources = base_sources + arch_sources + cpu_sources
+# encumbered should be last because we're adding to some of the other groups
+if isfile(joinpath(env['SRCDIR'], 'encumbered/SConscript')):
+ sources += SConscript('encumbered/SConscript', exports = 'env')
+
+
if env['FULL_SYSTEM']:
sources += full_system_sources
- if env['ALPHA_TLASER']:
- sources += turbolaser_sources
else:
sources += syscall_emulation_sources
@@ -401,8 +307,15 @@ def makeEnv(label, objsfx, strip = False, **kwargs):
envList.append(newEnv)
# Debug binary
+# Solaris seems to have some issue with DWARF2 debugging information, it's ok
+# with stabs though
+if sys.platform == 'sunos5':
+ debug_flag = '-gstabs+'
+else:
+ debug_flag = '-ggdb3'
+
makeEnv('debug', '.do',
- CCFLAGS = Split('-g3 -gdwarf-2 -O0'),
+ CCFLAGS = Split('%s -O0' % debug_flag),
CPPDEFINES = 'DEBUG')
# Optimized binary