From 72b3badb6197a042c52397fcea467f630628c75c Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 29 Jan 2021 19:23:04 -0800 Subject: lib.systems: add powerpc64-linux PPC64 supports two ABIs: ELF v1 and v2. ELFv1 is historically what GCC and most packages expect, but this is changing because musl outright does not work with ELFv1. So any distro which uses musl must use ELFv2. Many other platforms are moving to ELFv2 too, such as FreeBSD (as of v13) and Gentoo (as of late 2020). Since we use musl extensively, let's default to ELFv2. Nix gives us the power to specify this declaratively for the entire system, so ELFv1 is not dropped entirely. It can be specified explicitly in the target config, e.g. "powerpc64-unknown-linux-elfv1". Otherwise the default is "powerpc64-unknown-linux-elfv2". For musl, "powerpc64-unknown-linux-musl" must use elfv2 internally to function. --- lib/systems/examples.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/systems/examples.nix') diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index e8cf15479c056..fbb697f1fe1b3 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -21,6 +21,19 @@ rec { config = "powerpc64le-unknown-linux-musl"; }; + ppc64-elfv1 = { + config = "powerpc64-unknown-linux-elfv1"; + }; + ppc64-elfv2 = { + config = "powerpc64-unknown-linux-elfv2"; + }; + ppc64 = ppc64-elfv2; # default to modern elfv2 + + ppc64-musl = { + config = "powerpc64-unknown-linux-musl"; + gcc = { abi = "elfv2"; }; # for gcc configuration + }; + sheevaplug = { config = "armv5tel-unknown-linux-gnueabi"; } // platforms.sheevaplug; -- cgit 1.4.1