docs/1 - Introduction.txt
author "Antony N. Pavlov" <antony@niisi.msk.ru>
Sun Jul 17 16:53:40 2011 +0200 (2011-07-17)
changeset 2564 5d4e91c0343e
parent 2563 e17f35b05539
child 2908 dcdb309b7967
permissions -rw-r--r--
misc: fix more typos here and there...

Reported-by: "Antony N. Pavlov" <antony@niisi.msk.ru>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 File.........: 1 - Introduction.txt
     2 Copyright....: (C) 2010 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     3 License......: Creative Commons Attribution Share Alike (CC-by-sa), v2.5
     4 
     5 
     6 Introduction  /
     7 _____________/
     8 
     9 
    10 crosstool-NG aims at building toolchains. Toolchains are an essential component
    11 in a software development project. It will compile, assemble and link the code
    12 that is being developed. Some pieces of the toolchain will eventually end up
    13 in the resulting binary/ies: static libraries are but an example.
    14 
    15 So, a toolchain is a very sensitive piece of software, as any bug in one of the
    16 components, or a poorly configured component, can lead to execution problems,
    17 ranging from poor performance, to applications ending unexpectedly, to
    18 mis-behaving software (which more than often is hard to detect), to hardware
    19 damage, or even to human risks (which is more than regrettable).
    20 
    21 Toolchains are made of different piece of software, each being quite complex
    22 and requiring specially crafted options to build and work seamlessly. This
    23 is usually not that easy, even in the not-so-trivial case of native toolchains.
    24 The work reaches a higher degree of complexity when it comes to cross-
    25 compilation, where it can become quite a nightmare...
    26 
    27 Some cross-toolchains exist on the internet, and can be used for general
    28 development, but they have a number of limitations:
    29   - they can be general purpose, in that they are configured for the majority:
    30     no optimisation for your specific target,
    31   - they can be prepared for a specific target and thus are not easy to use,
    32     nor optimised for, or even supporting your target,
    33   - they often are using aging components (compiler, C library, etc...) not
    34     supporting special features of your shiny new processor;
    35 On the other side, these toolchain offer some advantages:
    36   - they are ready to use and quite easy to install and setup,
    37   - they are proven if used by a wide community.
    38 
    39 But once you want to get all the juice out of your specific hardware, you will
    40 want to build your own toolchain. This is where crosstool-NG comes into play.
    41 
    42 There are also a number of tools that build toolchains for specific needs,
    43 which are not really scalable. Examples are:
    44   - buildroot (buildroot.uclibc.org) whose main purpose is to build root file
    45     systems, hence the name. But once you have your toolchain with buildroot,
    46     part of it is installed in the root-to-be, so if you want to build a whole
    47     new root, you either have to save the existing one as a template and
    48     restore it later, or restart again from scratch. This is not convenient,
    49   - ptxdist (www.pengutronix.de/software/ptxdist), whose purpose is very
    50     similar to buildroot,
    51   - other projects (openembedded.org for example), which are again used to
    52     build root file systems.
    53 
    54 crosstool-NG is really targeted at building toolchains, and only toolchains.
    55 It is then up to you to use it the way you want.
    56 
    57 
    58 History |
    59 --------+
    60 
    61 crosstool was first 'conceived' by Dan Kegel, who offered it to the community
    62 as a set of scripts, a repository of patches, and some pre-configured, general
    63 purpose setup files to be used to configure crosstool. This is available at
    64 http://www.kegel.com/crosstool, and the subversion repository is hosted on
    65 google at http://code.google.com/p/crosstool/.
    66 
    67 I once managed to add support for uClibc-based toolchains, but it did not make
    68 into mainline, mostly because I didn't have time to port the patch forward to
    69 the new versions, due in part to the big effort it was taking.
    70 
    71 So I decided to clean up crosstool in the state it was, re-order the things
    72 in place, add appropriate support for what I needed, that is uClibc support
    73 and a menu-driven configuration, named the new implementation crosstool-NG,
    74 (standing for crosstool Next Generation, as many other community projects do,
    75 and as a wink at the TV series "Star Trek: The Next Generation" ;-) ) and
    76 made it available to the community, in case it was of interest to any one.
    77 
    78 
    79 Referring to crosstool-NG |
    80 --------------------------+
    81 
    82 The long name of the project is crosstool-NG:
    83   * no leading uppercase (except as first word in a sentence)
    84   * crosstool and NG separated with a hyphen (dash)
    85   * NG in uppercase
    86 
    87 Crosstool-NG can also be referred to by its short name CT-NG:
    88   * all in uppercase
    89   * CT and NG separated with a hyphen (dash)
    90 
    91 The long name is preferred over the short name, except in mail subjects, where
    92 the short name is a better fit.
    93 
    94 When referring to a specific version of crosstool-NG, append the version number
    95 either as:
    96   * crosstool-NG X.Y.Z
    97     - the long name, a space, and the version string
    98   * crosstool-ng-X.Y.Z
    99     - the long name in lowercase, a hyphen (dash), and the version string
   100     - this is used to name the release tarballs
   101   * crosstool-ng-X.Y.Z+hg_id
   102     - the long name in lowercase, a hyphen, the version string, and the Hg id
   103       (as returned by: ct-ng version)
   104     - this is used to differentiate between releases and snapshots
   105 
   106 The frontend to crosstool-NG is the command ct-ng:
   107   * all in lowercase
   108   * ct and ng separated by a hyphen (dash)