update psp to new newlib 4.4.0.20231231 based toolchain/sdk
[rofl0r-mmix-cross.git] / README.md
blob43b4b1d8fe038bb479ad993bb51b5a48dbcc0112
1 About newlib-cross
2 ==================
4 This is a small suite of scripts and patches to build a newlib gcc toolchain
5 for a number of supported systems, or just regular newlib toolchain for
6 baremetal systems that don't require any additional patches.
8 supported:
9 mmix - cross-compiler for knuth's MMIX simulator.
10        note: this compiler builds without custom patches, but only gcc 4.2.4
11        is tested (see configs/mmix).
12 psp  - cross-compiler for playstation portable, intended to be used with
13        pspsdk ( https://github.com/pspdev/pspsdk ).
14        supported are all versions where there exists a gcc-x.x.x-psp.diff
15        in patches/.
17 ./build.sh should build a cross compiler to $HOME/toolchains, no muss, no fuss.
18 You should edit config.sh to select a config preset and eventually override
19 paths, and component versions to your likings. 
20 you may even copy config.sh to another directory then run build.sh from there
21 to avoid polluting the source dir, but clean.sh can always clean up after a
22 build.
24 Notes on building normal cross compilers
25 ========================================
27 * You can set versions of binutils, GCC or newlib in config.sh with:
29         BINUTILS_VERSION=<version>
30         GCC_VERSION=<version>
31         NEWLIB_VERSION=<version>
33 only tested versions are the ones set by default.
35 * You can set configure flags for each step:
37         BINUTILS_CONFFLAGS=...
38         GCC_BOOTSTRAP_CONFFLAGS=...
39         NEWLIB_CONFFLAGS=...
40         GCC_CONFFLAGS=...
42 * If you do not have the GMP, MPFR and/or MPC development libraries on your
43   host, you can build them along with GCC with a config.sh line:
45         GCC_BUILTIN_PREREQS=yes
48 Other scripts and helpers
49 =========================
51 * config.sh is an example configuration file. In many cases, it will do exactly
52   what you want it to do with no modification, which is why it's simply named
53   "config.sh" instead of, e.g., "config-sample.sh"
55 * extra/build-gcc-deps.sh will build the dependencies for GCC into the build
56   prefix specified by config.sh, which are just
57   often a nice thing to have. It is of course not necessary.
60 Requirements
61 ============
63 newlib-cross depends on:
65 * shell and core utils (busybox is fine)
66 * mercurial or git (for checkout only)
67 * wget (busybox is fine)
68 * patch
69 * gcc
70 * make
71 * awk
73 The following are GCC dependencies, which can be installed on the host system,
74 or installed automatically using `GCC_BUILTIN_PREREQS=yes`:
75 ONLY NEEDED FOR GCC versions >= 4.3
77 * gmp
78 * mpfr
79 * mpc
81 Building GMP additionally requires m4.