Difference between revisions of "Things that aren't really documented anywhere"

From gem5
Jump to: navigation, search
 
 
Line 8: Line 8:
 
* -mflat for SPARC to not use register window save and restore functions. This is deprecated unavailable in gcc 4.0 and up.
 
* -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.
 
* -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.
 
== BK stuff ==
 
* diff between the commited code and the head: <code>bk export -tpatch -h -r`bk repogca`,+</code>
 

Latest revision as of 01:05, 25 June 2008

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.