Things that aren't really documented anywhere

From gem5
Revision as of 01:05, 25 June 2008 by Saidi (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Useful M5 tidbits

  • To cross compile a kernel make ARCH=alpha CROSS_COMPILE=alpha-unknown-linux-gnu-
  • To update refercences in m5-test update_refs=y on the scons command line.

Useful GCC options

  • -m64 or -m32 to generate 64 or 32 bit style code
  • -mcpu=xxx to specify what version of an architecture to generate code for. For instance for sparc, v9 uses all the v9 instructions, while the default is v7
  • -mflat for SPARC to not use register window save and restore functions. This is deprecated unavailable in gcc 4.0 and up.
  • -nostdlib compiles without linking in the standard library. This is useful for specifying exactly what will be in the program, and for excluding features like system calls or unimplimented instructions, especially when combined with hand tweaked or inline assembler. You must provide the function _start, which is normally provided by the standard libraries and is used as the object files entry point.