This pr adds initial support for creating a cross-compile tool chain for arbitrary architectures. For now only `aarch64` and `riscv64` are implemented, but simlpy adding another architecture to the list of supported platforms in each package should mostly work with minimal patches.
In order to build native gcc for aarch64, you can run
```
nix-build --expr '((import ./tidepool).packages.foundation.gcc.versions."13.2.0-stage4".package.extend { platform = { build = "aarch64-linux"; host = "aarch64-linux"; target = "aarch64-linux"; }; }).package'
```
or
```
nix-build tidepool -A packages.foundation.gcc.latest.packages.aarch64-linux.aarch64-linux.aarch64-linux
```
Running this command:
- Uses [foundation](https://git.auxolotl.org/auxolotl/foundation) to bootstrap i686 gcc
- Incrementally bootstraps x86_64 gcc from i686
- Runs through the same incremental process, but this time using x86_64 gcc we previously built to bootstrap aarch64
- Build the final native aarch64 gcc
Co-authored-by: Jake Hamilton <jake.hamilton@hey.com>
Reviewed-on: #14
Reviewed-by: Jake Hamilton <jake.hamilton@hey.com>
Co-authored-by: Victor Fuentes <vlinkz@snowflakeos.org>
Co-committed-by: Victor Fuentes <vlinkz@snowflakeos.org>
|
||
|---|---|---|
| .. | ||
| npins | ||
| src | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
Aux Tidepool
Aux Tidepool is an initial package set built on top of Aux Foundation. Packages are created and managed using Aux Lib's module system to allow for highly dynamic and extensible configuration.
Usage
Packages can be imported both with and without Nix Flakes. To import them using Nix Flakes, add this repository as an input.
inputs.tidepool.url = "https://git.auxolotl.org/auxolotl/labs/archive/main.tar.gz?dir=tidepool";
To import this library without using Nix Flakes, you will need to use fetchTarball and
import the library entrypoint.
let
labs = builtins.fetchTarball {
url = "https://git.auxolotl.org/auxolotl/labs/archive/main.tar.gz";
sha256 = "<sha256>";
};
tidepool = import "${labs}/tidepool" {};
in
# ...