yann@2076: File.........: C - Misc. tutorials.txt yann@2076: Copyrigth....: (C) 2010 Yann E. MORIN yann@2076: License......: Creative Commons Attribution Share Alike (CC-by-sa), v2.5 yann@2076: yann@2076: yann@2076: Misc. tutorials / yann@2076: ________________/ yann@2076: yann@2076: yann@2076: Using crosstool-NG on FreeBSD (and other *BSD) | yann@2076: -----------------------------------------------+ yann@2076: yann@2076: Contributed by: Titus von Boxberg yann@2076: yann@2076: Prerequisites and instructions for using ct-ng for building a cross toolchain on FreeBSD as host. yann@2076: yann@2076: 0) Tested on FreeBSD 8.0 yann@2076: yann@2076: 1) Install (at least) the following ports yann@2076: archivers/lzma yann@2076: textproc/gsed yann@2076: devel/gmake yann@2076: devel/patch yann@2076: shells/bash yann@2076: devel/bison yann@2076: lang/gawk yann@2076: devel/automake110 yann@2076: ftp/wget yann@2076: yann@2076: Of course, you should have /usr/local/bin in your PATH. yann@2076: yann@2076: 2) run ct-ng's configure with the following tool configuration: yann@2076: ./configure --with-sed=/usr/local/bin/gsed --with-make=/usr/local/bin/gmake \ yann@2076: --with-patch=/usr/local/bin/gpatch yann@2076: [...other configure parameters as you like...] yann@2076: yann@2076: 3) proceed as described in general documentation yann@2076: but use gmake instead of make yann@2076: yann@2076: yann@2076: Using crosstool-NG on MacOS-X | yann@2076: ------------------------------+ yann@2076: yann@2076: Contributed by: Titus von Boxberg yann@2076: yann@2076: Prerequisites and instructions for using crosstool-NG for building a cross yann@2076: toolchain on MacOS as host. yann@2076: yann@2076: 0) Mac OS Snow Leopard, with Developer Tools 3.2 installed, or yann@2076: Mac OS Leopard, with Developer Tools & newer gcc (>= 4.3) installed yann@2076: via macports yann@2076: yann@2076: 1) You have to use a case sensitive file system for ct-ng's build and target yann@2076: directories. Use a disk or disk image with a case sensitive fs that you yann@2076: mount somewhere. yann@2076: yann@2076: 2) Install macports (or similar easy means of installing 3rd party software), yann@2076: make sure that macport's bin dir is in your PATH. yann@2076: Furtheron assuming it is /opt/local/bin. yann@2076: yann@2076: 3) Install (at least) the following macports yann@2076: ncurses yann@2076: lzmautils yann@2076: libtool yann@2076: binutils yann@2076: gsed yann@2076: gawk yann@2076: gcc43 (only necessary for Leopard OSX 10.5) yann@2076: yann@2076: On Leopard, make sure that the macport's gcc is called with the default yann@2076: commands (gcc, g++,...), e.g. via macport gcc_select yann@2076: yann@2076: 4) run ct-ng's configure with the following tool configuration yann@2076: (assuming you have installed the tools via macports in /opt/local): yann@2076: ./configure --with-sed=/opt/local/bin/gsed \ yann@2076: --with-libtool=/opt/local/bin/glibtool \ yann@2076: --with-objcopy=/opt/local/bin/gobjcopy \ yann@2076: --with-objdump=/opt/local/bin/gobjdump \ yann@2076: --with-readelf=/opt/local/bin/greadelf \ yann@2076: [...other configure parameters as you like...] yann@2076: yann@2076: 5) proceed as described in standard documentation yann@2076: yann@2076: ----- yann@2076: yann@2076: HINTS: yann@2076: - Apparently, GNU make's builtin variable .LIBPATTERNS is misconfigured yann@2076: under MacOS: It does not include lib%.dylib. yann@2076: This affects build of (at least) gdb-7.1 yann@2076: Put 'lib%.a lib%.so lib%.dylib' as .LIBPATTERNS into your environment yann@2076: before executing ct-ng build. yann@2076: See http://www.gnu.org/software/make/manual/html_node/Libraries_002fSearch.html yann@2076: as an explanation.