From 1c10efc912c240901b186974b8ea4f48814c7b8b Mon Sep 17 00:00:00 2001 From: Daniel Goertzen Date: Sun, 6 Jan 2019 12:57:36 -0600 Subject: add generic x86_32 support (#52634) * add generic x86_32 support - Add support for i386-i586. - Add `isx86_32` predicate that can replace most uses of `isi686`. - `isi686` is reinterpreted to mean "exactly i686 arch, and not say i585 or i386". - This branch was used to build working i586 kernel running on i586 hardware. * revert `isi[345]86`, remove dead code - Remove changes to dead code in `doubles.nix` and `for-meta.nix`. - Remove `isi[345]86` predicates since other cpu families don't have specific model predicates. * remove i386-linux since linux not supported on that cpu --- lib/systems/inspect.nix | 3 ++- lib/systems/platforms.nix | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 2fcf1afe462..e35e7b4a1ec 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -9,7 +9,8 @@ let abis = lib.mapAttrs (_: abi: builtins.removeAttrs abi [ "assertions" ]) abis rec { patterns = rec { isi686 = { cpu = cpuTypes.i686; }; - isx86_64 = { cpu = cpuTypes.x86_64; }; + isx86_32 = { cpu = { family = "x86"; bits = 32; }; }; + isx86_64 = { cpu = { family = "x86"; bits = 64; }; }; isPowerPC = { cpu = cpuTypes.powerpc; }; isPower = { cpu = { family = "power"; }; }; isx86 = { cpu = { family = "x86"; }; }; diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index 1ed072e9464..03bfce25610 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -467,6 +467,8 @@ rec { }; selectBySystem = system: { + "i486-linux" = pc32; + "i586-linux" = pc32; "i686-linux" = pc32; "x86_64-linux" = pc64; "armv5tel-linux" = sheevaplug; -- cgit 1.4.1