This is Scratchbox's cross-compiler toolchain build tree.
You can build a custom toolchain by following these steps:

  1. You need to have Scratchbox 1.0.x installed

  2. Your normal user account must have write access to the
     /scratchbox/compilers directory and all directories under
     /scratchbox/device_tools

  3. Log into Scratchbox and use sb-menu to change the HOST
     target (using Setup):
     - select the "debian" devkit
     - install "Devkit" and "/etc" files
     - re-select the HOST target

  4. Extract the sb-toolchains build tree under your Scratchbox
     home directory and go to that directory (~/sb-toolchains)

  5. Choose one of the meta/toolchain/*.conf configurations or write your
     own (based on one of the existing ones)

  6. Build the toolchain including all optional tools:
     > make CONFIG=meta/toolchain/my.conf

  7. The toolchain is now ready to use (use sb-menu to create a new
     Scratchbox target)

  8. You can create tarball and Debian packages inside Scratchbox:
     > make CONFIG=meta/toolchain/my.conf tarball deb


Testing the compiled toolchain

  1. In the Scratchbox's HOST target build the dejagnu
     > make -C test_tools/dejagnu install

  2. Set up a Scratchbox target that uses the new toolchain. From sb-menu:
     - setup a target 
     - create a new target
     - select the newly compiled toolchain
     - select CPU-transparency method
     - install files to target, select C-library and etc files
     - select the new target

  3. Run the initial tests
     - go  to the sb-toolchains//test_tools/test_scripts directory
     > ./init_tests.sh FILE_TYPE

  4. If they went all ok then run the dejagnu tests
     > ./reg_tests.sh COMPILER_DIR
