installing_the_toolchain.md 1.49 KB
Newer Older
1 2 3
Installing the toolchain
========================

4 5
The redox toolchain is required in order to compile certain parts of redox. This basically entails installing a patched version of gcc.

6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
### Ubuntu and other Debian based systems

To install the toolchain, run the following commands:
```bash
# Get the Redox OS APT key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F

# Install the APT repository
sudo add-apt-repository 'deb https://static.redox-os.org/toolchain/apt /'

# Update your package lists
sudo apt update

# Install the cross compiler
sudo apt install x86-64-unknown-redox-gcc
```

### Arch Linux
To install the toolchain, run the following commands:
25
 ```bash
26
 # Clone libc
27
 git clone --recursive git@gitlab.redox-os.org:redox-os/libc
28
 
29
 # Go to the packages
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
 cd libc/packages/arch
 
 # Start with binutils
 cd binutils
 makepkg -si
 
 # Then autoconf
 cd ../autoconf
 makepkg -si
 
 # Then gcc-freestanding
 cd ../gcc-freestanding
 makepkg -si
 
 # Then newlib
 cd ../newlib
 makepkg -si
 
 # Finally gcc
 cd ../gcc
 makepkg -si
 ```

### Other distros/Mac OS X
To install the toolchain, run the following commands:
55
 ```bash
56
 # Clone libc
57
 git clone --recursive git@gitlab.redox-os.org:redox-os/libc
58 59 60 61 62 63 64 65
 
 # Run the setup script
 cd libc
 ./setup.sh all
 
 # Add the tools to your path
 export PATH=$PATH:/path/to/libc/build/prefix/bin
 ```
66 67 68
Next steps
----------

69
Now that we have the build tools and the toolchain, we can [prepare our build](getting_started/preparing_the_build.html).