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