docs/README.macos.txt
author Bart vdr Meulen <bartvdrmeulen@gmail.com>
Sun Jul 11 21:36:20 2010 +0200 (2010-07-11)
changeset 2017 f637b6c2162b
parent 1971 cbe89e8dfc9c
permissions -rw-r--r--
kernel: add mingw

Add the option to build a cross-compiler for kernel type 'mingw'.
The resulting cross-compiler can be used to build applications on a Linux host
that can be run on a Windows target.

Compiler is build using the mingwrt and w32-api packages aviable from the
MinGW project (http://sourceforge.net/projects/mingw).

The windows headers (w32-api package) are extracting with the kernel_headers
step The libraries and other headers from both packages are build and
installed in the various steps of libc

Signed-off-by: Bart vdr Meulen <bartvdrmeulen@gmail.com>
[yann.morin.1998@anciens.enib.fr: fix kernel headers comment, don't "return 0"]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 22 May 2010 - Titus
     2 
     3 Prerequisites and instructions for using crosstool-NG for building a cross
     4 toolchain on MacOS as host.
     5 
     6 0) Mac OS Snow Leopard, with Developer Tools 3.2 installed, or
     7    Mac OS Leopard, with Developer Tools & newer gcc (>= 4.3) installed
     8    via macports
     9 
    10 1) You have to use a case sensitive file system for ct-ng's build and target
    11    directories. Use a disk or disk image with a case sensitive fs that you
    12    mount somewhere.
    13 
    14 2) Install macports (or similar easy means of installing 3rd party software),
    15    make sure that macport's bin dir is in your PATH.
    16    Furtheron assuming it is /opt/local/bin.
    17 
    18 3) Install (at least) the following macports
    19    ncurses
    20    lzmautils
    21    libtool
    22    binutils
    23    gsed
    24    gawk
    25    gcc43 (only necessary for Leopard OSX 10.5)
    26 
    27    On Leopard, make sure that the macport's gcc is called with the default
    28    commands (gcc, g++,...), e.g. via macport gcc_select
    29 
    30 4) run ct-ng's configure with the following tool configuration
    31    (assuming you have installed the tools via macports in /opt/local):
    32    ./configure --with-sed=/opt/local/bin/gsed           \
    33                --with-libtool=/opt/local/bin/glibtool   \
    34                --with-objcopy=/opt/local/bin/gobjcopy   \
    35                --with-objdump=/opt/local/bin/gobjdump   \
    36                --with-readelf=/opt/local/bin/greadelf   \
    37                [...other configure parameters as you like...]
    38 
    39 5) proceed as described in standard documentation
    40 
    41 -----
    42 
    43 HINTS:
    44 - Apparently, GNU make's builtin variable .LIBPATTERNS is misconfigured
    45   under MacOS: It does not include lib%.dylib.
    46   This affects build of (at least) gdb-7.1
    47   Put 'lib%.a lib%.so lib%.dylib' as .LIBPATTERNS into your environment
    48   before executing ct-ng build.
    49   See http://www.gnu.org/software/make/manual/html_node/Libraries_002fSearch.html
    50   as an explanation.