docs/C - Misc. tutorials.txt
changeset 2076 b58109b7b321
child 2077 b11117cdfdf7
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docs/C - Misc. tutorials.txt	Sat Aug 14 16:37:11 2010 +0200
     1.3 @@ -0,0 +1,93 @@
     1.4 +File.........: C - Misc. tutorials.txt
     1.5 +Copyrigth....: (C) 2010 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     1.6 +License......: Creative Commons Attribution Share Alike (CC-by-sa), v2.5
     1.7 +
     1.8 +
     1.9 +Misc. tutorials  /
    1.10 +________________/
    1.11 +
    1.12 +
    1.13 +Using crosstool-NG on FreeBSD (and other *BSD) |
    1.14 +-----------------------------------------------+
    1.15 +
    1.16 +Contributed by: Titus von Boxberg
    1.17 +
    1.18 +Prerequisites and instructions for using ct-ng for building a cross toolchain on FreeBSD as host.
    1.19 +
    1.20 +0) Tested on FreeBSD 8.0
    1.21 +
    1.22 +1) Install (at least) the following ports
    1.23 +   archivers/lzma
    1.24 +   textproc/gsed
    1.25 +   devel/gmake
    1.26 +   devel/patch
    1.27 +   shells/bash
    1.28 +   devel/bison
    1.29 +   lang/gawk
    1.30 +   devel/automake110
    1.31 +   ftp/wget
    1.32 +
    1.33 +   Of course, you should have /usr/local/bin in your PATH.
    1.34 +
    1.35 +2) run ct-ng's configure with the following tool configuration:
    1.36 +   ./configure --with-sed=/usr/local/bin/gsed --with-make=/usr/local/bin/gmake \
    1.37 +   --with-patch=/usr/local/bin/gpatch
    1.38 +   [...other configure parameters as you like...]
    1.39 +
    1.40 +3) proceed as described in general documentation
    1.41 +   but use gmake instead of make
    1.42 +
    1.43 +
    1.44 +Using crosstool-NG on MacOS-X |
    1.45 +------------------------------+
    1.46 +
    1.47 +Contributed by: Titus von Boxberg
    1.48 +
    1.49 +Prerequisites and instructions for using crosstool-NG for building a cross
    1.50 +toolchain on MacOS as host.
    1.51 +
    1.52 +0) Mac OS Snow Leopard, with Developer Tools 3.2 installed, or
    1.53 +   Mac OS Leopard, with Developer Tools & newer gcc (>= 4.3) installed
    1.54 +   via macports
    1.55 +
    1.56 +1) You have to use a case sensitive file system for ct-ng's build and target
    1.57 +   directories. Use a disk or disk image with a case sensitive fs that you
    1.58 +   mount somewhere.
    1.59 +
    1.60 +2) Install macports (or similar easy means of installing 3rd party software),
    1.61 +   make sure that macport's bin dir is in your PATH.
    1.62 +   Furtheron assuming it is /opt/local/bin.
    1.63 +
    1.64 +3) Install (at least) the following macports
    1.65 +   ncurses
    1.66 +   lzmautils
    1.67 +   libtool
    1.68 +   binutils
    1.69 +   gsed
    1.70 +   gawk
    1.71 +   gcc43 (only necessary for Leopard OSX 10.5)
    1.72 +
    1.73 +   On Leopard, make sure that the macport's gcc is called with the default
    1.74 +   commands (gcc, g++,...), e.g. via macport gcc_select
    1.75 +
    1.76 +4) run ct-ng's configure with the following tool configuration
    1.77 +   (assuming you have installed the tools via macports in /opt/local):
    1.78 +   ./configure --with-sed=/opt/local/bin/gsed           \
    1.79 +               --with-libtool=/opt/local/bin/glibtool   \
    1.80 +               --with-objcopy=/opt/local/bin/gobjcopy   \
    1.81 +               --with-objdump=/opt/local/bin/gobjdump   \
    1.82 +               --with-readelf=/opt/local/bin/greadelf   \
    1.83 +               [...other configure parameters as you like...]
    1.84 +
    1.85 +5) proceed as described in standard documentation
    1.86 +
    1.87 +-----
    1.88 +
    1.89 +HINTS:
    1.90 +- Apparently, GNU make's builtin variable .LIBPATTERNS is misconfigured
    1.91 +  under MacOS: It does not include lib%.dylib.
    1.92 +  This affects build of (at least) gdb-7.1
    1.93 +  Put 'lib%.a lib%.so lib%.dylib' as .LIBPATTERNS into your environment
    1.94 +  before executing ct-ng build.
    1.95 +  See http://www.gnu.org/software/make/manual/html_node/Libraries_002fSearch.html
    1.96 +  as an explanation.