From 72d161f548701a2a8dab334dee76b63bccc0f07c Mon Sep 17 00:00:00 2001 From: CrystalGamma Date: Tue, 21 Aug 2018 21:31:34 +0200 Subject: [RFC] ppc64le enablement (#45340) * ppc64le enablement * gcc, glibc: properly handle __float128 * lib/systems, stdenv: syntax cleanup * gcc7: remove ugly hack * gcc: add/update __float128 flags * stdenv: add another pair of quotes for consistency * gcc: move __float128 flag for ppc64le-glibc into common/platform-flags.nix --- lib/systems/doubles.nix | 2 +- lib/systems/examples.nix | 8 ++++++++ lib/systems/inspect.nix | 1 + lib/systems/parse.nix | 2 ++ lib/systems/platforms.nix | 17 +++++++++++++++++ 5 files changed, 29 insertions(+), 1 deletion(-) (limited to 'lib/systems') diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix index c6618083ce729..adc454406b851 100644 --- a/lib/systems/doubles.nix +++ b/lib/systems/doubles.nix @@ -44,5 +44,5 @@ in rec { openbsd = filterDoubles predicates.isOpenBSD; unix = filterDoubles predicates.isUnix; - mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux"]; + mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" "powerpc64le-linux"]; } diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 31772ba0054db..3828b2f84c649 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -8,6 +8,14 @@ rec { # # Linux # + powernv = { + config = "powerpc64le-unknown-linux-gnu"; + platform = platforms.powernv; + }; + musl-power = { + config = "powerpc64le-unknown-linux-musl"; + platform = platforms.powernv; + }; sheevaplug = rec { config = "armv5tel-unknown-linux-gnueabi"; diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 0c70f2a7cd5fa..ac34ed45695ce 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -11,6 +11,7 @@ rec { isi686 = { cpu = cpuTypes.i686; }; isx86_64 = { cpu = cpuTypes.x86_64; }; isPowerPC = { cpu = cpuTypes.powerpc; }; + isPower = { cpu = { family = "power"; }; }; isx86 = { cpu = { family = "x86"; }; }; isAarch32 = { cpu = { family = "arm"; bits = 32; }; }; isAarch64 = { cpu = { family = "arm"; bits = 64; }; }; diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index b07396a9dfd72..7ee3479c333d8 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -90,6 +90,8 @@ rec { mips64el = { bits = 64; significantByte = littleEndian; family = "mips"; }; powerpc = { bits = 32; significantByte = bigEndian; family = "power"; }; + powerpc64 = { bits = 64; significantByte = bigEndian; family = "power"; }; + powerpc64le = { bits = 64; significantByte = littleEndian; family = "power"; }; riscv32 = { bits = 32; significantByte = littleEndian; family = "riscv"; }; riscv64 = { bits = 64; significantByte = littleEndian; family = "riscv"; }; diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index 8027f6b9fc1b8..56783d99e3d43 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -20,6 +20,22 @@ rec { kernelAutoModules = false; }; + powernv = { + name = "PowerNV"; + kernelArch = "powerpc"; + kernelBaseConfig = "powernv_defconfig"; + kernelTarget = "zImage"; + kernelInstallTarget = "install"; + kernelFile = "vmlinux"; + kernelAutoModules = true; + # avoid driver/FS trouble arising from unusual page size + kernelExtraConfig = '' + PPC_64K_PAGES n + PPC_4K_PAGES y + IPV6 y + ''; + }; + ## ## ARM ## @@ -458,5 +474,6 @@ rec { "armv7l-linux" = armv7l-hf-multiplatform; "aarch64-linux" = aarch64-multiplatform; "mipsel-linux" = fuloong2f_n32; + "powerpc64le-linux" = powernv; }.${system} or pcBase; } -- cgit 1.4.1