docs/C - Misc. tutorials.txt
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Aug 14 16:37:11 2010 +0200 (2010-08-14)
changeset 2076 b58109b7b321
child 2077 b11117cdfdf7
permissions -rw-r--r--
docs: split into multiple files

The overview.txt file has evolved into more than just an overview.
Split it into chapters, and include the misc tutorials.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 File.........: C - Misc. tutorials.txt
     2 Copyrigth....: (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 Misc. tutorials  /
     7 ________________/
     8 
     9 
    10 Using crosstool-NG on FreeBSD (and other *BSD) |
    11 -----------------------------------------------+
    12 
    13 Contributed by: Titus von Boxberg
    14 
    15 Prerequisites and instructions for using ct-ng for building a cross toolchain on FreeBSD as host.
    16 
    17 0) Tested on FreeBSD 8.0
    18 
    19 1) Install (at least) the following ports
    20    archivers/lzma
    21    textproc/gsed
    22    devel/gmake
    23    devel/patch
    24    shells/bash
    25    devel/bison
    26    lang/gawk
    27    devel/automake110
    28    ftp/wget
    29 
    30    Of course, you should have /usr/local/bin in your PATH.
    31 
    32 2) run ct-ng's configure with the following tool configuration:
    33    ./configure --with-sed=/usr/local/bin/gsed --with-make=/usr/local/bin/gmake \
    34    --with-patch=/usr/local/bin/gpatch
    35    [...other configure parameters as you like...]
    36 
    37 3) proceed as described in general documentation
    38    but use gmake instead of make
    39 
    40 
    41 Using crosstool-NG on MacOS-X |
    42 ------------------------------+
    43 
    44 Contributed by: Titus von Boxberg
    45 
    46 Prerequisites and instructions for using crosstool-NG for building a cross
    47 toolchain on MacOS as host.
    48 
    49 0) Mac OS Snow Leopard, with Developer Tools 3.2 installed, or
    50    Mac OS Leopard, with Developer Tools & newer gcc (>= 4.3) installed
    51    via macports
    52 
    53 1) You have to use a case sensitive file system for ct-ng's build and target
    54    directories. Use a disk or disk image with a case sensitive fs that you
    55    mount somewhere.
    56 
    57 2) Install macports (or similar easy means of installing 3rd party software),
    58    make sure that macport's bin dir is in your PATH.
    59    Furtheron assuming it is /opt/local/bin.
    60 
    61 3) Install (at least) the following macports
    62    ncurses
    63    lzmautils
    64    libtool
    65    binutils
    66    gsed
    67    gawk
    68    gcc43 (only necessary for Leopard OSX 10.5)
    69 
    70    On Leopard, make sure that the macport's gcc is called with the default
    71    commands (gcc, g++,...), e.g. via macport gcc_select
    72 
    73 4) run ct-ng's configure with the following tool configuration
    74    (assuming you have installed the tools via macports in /opt/local):
    75    ./configure --with-sed=/opt/local/bin/gsed           \
    76                --with-libtool=/opt/local/bin/glibtool   \
    77                --with-objcopy=/opt/local/bin/gobjcopy   \
    78                --with-objdump=/opt/local/bin/gobjdump   \
    79                --with-readelf=/opt/local/bin/greadelf   \
    80                [...other configure parameters as you like...]
    81 
    82 5) proceed as described in standard documentation
    83 
    84 -----
    85 
    86 HINTS:
    87 - Apparently, GNU make's builtin variable .LIBPATTERNS is misconfigured
    88   under MacOS: It does not include lib%.dylib.
    89   This affects build of (at least) gdb-7.1
    90   Put 'lib%.a lib%.so lib%.dylib' as .LIBPATTERNS into your environment
    91   before executing ct-ng build.
    92   See http://www.gnu.org/software/make/manual/html_node/Libraries_002fSearch.html
    93   as an explanation.