Use new ARM instructions for interrupts, exceptions and system calls.
[AROS.git] / tools / collect-aros / README
blobfb0a402206c3424c4136b775699076f6d0619853
1  Notes on bootstrapping a new crosscompiler environment.
3  You can easily build a standalone version of collect-aros from the configured AROS
4 source tree using 'make standalone-collect-aros' command.
6  If you are bootstrapping a build for a new architecture, and don't have a compiler for
7 the target at all, you'll be unable to configure the tree. In this case you need to do the
8 following:
10 1. Copy env.h.in file as env.h and replace @aros_target_cpu@ with your CPU and @aros_object_format@
11    with correct object format name.
12 2. Run "make USER_CFLAGS=-D_STANDALONE_" right in this directory. If you're building on MinGW32,
13    this command won't work. Use "make CC=gcc AROS_HOST_ARCH=mingw32".
15  You need to perform the following steps to create a new crosscompiler from scratch:
17 1. Download patches from contrib/gnu/gcc and contrib/gnu/binutils
18 2. Download corresponding binutils and gcc source archives. Note that for i386-aros target
19    you may use the latest binutils because support for this target is already in mainstream.
20 3. Download AROS SDK from AROS web site.
21 4. Patch, configure, build and install binutils with --target=<cpu>-aros
22 5. Extract include and lib directories from SDK into /usr/local/<cpu>-aros/ directory.
23    This assumes that you didn't specify any --prefix while configuring your tools.
24    Otherwise specify yor prefix instead of /usr/local. Rename 'include' to 'sys-include'.
25    If you're on Windows, check also lib/libm.a and lib/libz.a. Originally they are symlinks
26    to libarosm.a and libarosz.a respectively, and they are extracted as zero-length files,
27    which cause linker to fail. Replace them with plain copies of libarosm.a and libarosz.a.
28 6. Build collect-aros and install into <prefix>/<cpu>-aros/bin directory
29    (/usr/local/i386-aros/bin for example). In theory you can put it into any directory in
30    your path (like /usr/local/bin), but this will prevent multiple crosstoolchains from
31    coexisting (i386-aros and ppc-aros for example).
32 7. Patch, configure, build and install gcc. That's all.