Difference between revisions of "Compiling workloads"

From gem5
Jump to: navigation, search
Line 1: Line 1:
 +
== Cross Compilers ==
 +
 
A cross compiler is a compiler set up to run on one ISA but generate binaries which run on another. You may need one if you intend to simulate a system which uses a particular ISA, Alpha for instance, but don't have access to actual Alpha hardware. There are various sources for cross compilers, listed here in roughly recommended order:
 
A cross compiler is a compiler set up to run on one ISA but generate binaries which run on another. You may need one if you intend to simulate a system which uses a particular ISA, Alpha for instance, but don't have access to actual Alpha hardware. There are various sources for cross compilers, listed here in roughly recommended order:
  
Line 4: Line 6:
 
# You can build your own cross compiler using crosstools-ng: Download it from [http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool#download here] and follow the instructions on that page.
 
# You can build your own cross compiler using crosstools-ng: Download it from [http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool#download here] and follow the instructions on that page.
 
# We have some available on our [[Download]] page.
 
# We have some available on our [[Download]] page.
 +
 +
== Syscall Emulation Mode ==
 +
 +
SE mode workloads must be statically linked. Gem5 doesn't yet support dynamic linking, so all benchmarks run in SE mode must be statically linked in order to be started properly by the simulator. In FS mode the simulated operating system takes care of any dynamic linking, so this restriction only applies to SE mode. If you're using gcc you can pass it the --static option.

Revision as of 22:13, 10 April 2011

Cross Compilers

A cross compiler is a compiler set up to run on one ISA but generate binaries which run on another. You may need one if you intend to simulate a system which uses a particular ISA, Alpha for instance, but don't have access to actual Alpha hardware. There are various sources for cross compilers, listed here in roughly recommended order:

  1. Some architectures have professionally build cross-compilers available from Code Sourcery. These are updated frequently and a good starting point: ARM, MIPS
  2. You can build your own cross compiler using crosstools-ng: Download it from here and follow the instructions on that page.
  3. We have some available on our Download page.

Syscall Emulation Mode

SE mode workloads must be statically linked. Gem5 doesn't yet support dynamic linking, so all benchmarks run in SE mode must be statically linked in order to be started properly by the simulator. In FS mode the simulated operating system takes care of any dynamic linking, so this restriction only applies to SE mode. If you're using gcc you can pass it the --static option.