-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove toolchain.sh in favor of Dockerfile
Signed-off-by: Martin Kröning <[email protected]>
- Loading branch information
Showing
4 changed files
with
87 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,22 @@ | ||
# hermit-gcc | ||
|
||
This repository contains scripts to build the cross-compiler for the Rust-based library OS [HermitCore](https://github.com/hermit-os/libhermit-rs). | ||
This repository contains a [`Dockerfile`] to build the GCC cross-compiler for [the Hermit Operating System]. | ||
|
||
## Requirements | ||
[`Dockerfile`]: Dockerfile | ||
[the Hermit Operating System]: http://hermit-os.org | ||
|
||
The build process works currently only on **x86-based Linux** systems. The following software packets are required to build HermitCore's toolchain on a Linux system: | ||
## Usage | ||
|
||
* Netwide Assembler (NASM) | ||
* GNU Make, GNU Binutils, cmake | ||
* Tools and libraries to build *linux*, *binutils* and *gcc* (e.g. flex, bison, MPFR library, ISL library, GMP library, MPC library) | ||
* Rust | ||
You can use the prebuilt [hermit-toolchain] OCI image to run `x86_64-hermit-gcc`: | ||
|
||
On Debian-based systems the packets can be installed by executing: | ||
``` | ||
sudo apt-get install cmake nasm libmpfr-dev libisl-dev libmpc-dev libgmp-dev flex bison | ||
``` | ||
|
||
Note: If issues arise during the build, try using requirements.sh to check the versions of the necessary packets and the configuration of the LD_LIBRARY_PATH (it should contain the MPFR library, GMP library and MPC library). | ||
[`hermit-toolchain`]: https://github.com/hermit-os/hermit-gcc/pkgs/container/hermit-toolchain | ||
|
||
## Building the HermitCore's toolchain | ||
```bash | ||
docker run ghcr.io/hermit-os/hermit-toolchain:latest x86_64-hermit-gcc -v | ||
``` | ||
|
||
To build the toolchain just call the script as follow: | ||
You can also use the image interactively and mount your current directory: | ||
|
||
```bash | ||
$ ./toolchain.sh x86_64-hermit /home/usr/hermit | ||
docker run --rm -it -v .:/mnt -w /mnt ghcr.io/hermit-os/hermit-toolchain:latest | ||
``` | ||
|
||
The first argument of the script specifies the target architecture, where the second argument defines the path to the installation directory. | ||
To create the toolchain, write access to the installation directory is required. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.