Crostool-NG 1.18.0 on Fedora 18

I have already posted descriptions about how to setup the crosstool-ng version 1.16.0 for Raspberry Pi on Fedora in hese posts: cross-compile, debug. Since the 1.18.0 version of crostool-ng has been released, I will create a short summary about what needs to be done to set it up for Raspberry Pi. Please note that the rest of the steps are identical with those that I described in the former posts, therefore I only the differences will be described:

Please make sure that the required dependecnies are installed.

sudo yum install bison flex gperf libtool texinfo gcc gcc-c++ gmp-devel expat expat-devel python python-devel kernel-devel patch

The main difference to the former version that it seems the strace build problem and the cannot find GMP version 4.1.3 or higher problem has disappeared in 1.18.0, therfore the config for RPi would look like the following:

  • Paths and misc options
    • Enable “Try features marked as EXPERIMENTAL”
    • If you don’t like the default toolset installation directory, then set the “Prefix directory” from “${HOME}/x-tools/${CT_TARGET}” to “${XTOOLS_HOME}/crosstool-ng-1.18.0-tools/${CT_TARGET}”. The ${XTOOLS_HOME} needs to be defined in your .bash_profile in advance
  • Target options
    • Be sure that the “Target Architecture” is set to “arm”
    • Be sure that “Little Endian” and “32bit” are selected
    • Be sure that “Floating point” is set to “hardware (FPU)”
    • Be sure that “Use EABI” is selected
  • Operating system
    • Set “Target OS” to Linux
  • C compiler
    • Enable “Show Linaro versions”
    • The “gcc version” set it to latest version: “linaro-4.7-2013.01”
    • Enable “C++” in order to have C++ compiler
    • Disable “Link libstdc++ statically into gcc binary” otherwise you will get the the following error “[ERROR] Static linking impossible on the host system ‘x86_64-build_unknown-linux-gnu'”
  • Debug facilities
    • Enable “ltrace”
    • Enable “gdb”
    • Enable “duma”
    • Enable “dmalloc”
    • Enable “strace”

Note: It is not recommended to build the crosstool-ng as root and by default crosstool-ng will not allow to execute the build as root