mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 23:07:36 +03:00
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
This commit is contained in:
parent
a4250d1478
commit
1c10efc912
@ -9,7 +9,8 @@ let abis = lib.mapAttrs (_: abi: builtins.removeAttrs abi [ "assertions" ]) abis
|
|||||||
rec {
|
rec {
|
||||||
patterns = rec {
|
patterns = rec {
|
||||||
isi686 = { cpu = cpuTypes.i686; };
|
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; };
|
isPowerPC = { cpu = cpuTypes.powerpc; };
|
||||||
isPower = { cpu = { family = "power"; }; };
|
isPower = { cpu = { family = "power"; }; };
|
||||||
isx86 = { cpu = { family = "x86"; }; };
|
isx86 = { cpu = { family = "x86"; }; };
|
||||||
|
@ -467,6 +467,8 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
selectBySystem = system: {
|
selectBySystem = system: {
|
||||||
|
"i486-linux" = pc32;
|
||||||
|
"i586-linux" = pc32;
|
||||||
"i686-linux" = pc32;
|
"i686-linux" = pc32;
|
||||||
"x86_64-linux" = pc64;
|
"x86_64-linux" = pc64;
|
||||||
"armv5tel-linux" = sheevaplug;
|
"armv5tel-linux" = sheevaplug;
|
||||||
|
@ -177,7 +177,7 @@ stdenv.mkDerivation {
|
|||||||
/**/ if targetPlatform.isAarch64 then endianPrefix + "aarch64"
|
/**/ if targetPlatform.isAarch64 then endianPrefix + "aarch64"
|
||||||
else if targetPlatform.isAarch32 then endianPrefix + "arm"
|
else if targetPlatform.isAarch32 then endianPrefix + "arm"
|
||||||
else if targetPlatform.isx86_64 then "x86-64"
|
else if targetPlatform.isx86_64 then "x86-64"
|
||||||
else if targetPlatform.isx86 then "i386"
|
else if targetPlatform.isx86_32 then "i386"
|
||||||
else if targetPlatform.isMips then {
|
else if targetPlatform.isMips then {
|
||||||
"mips" = "btsmipn32"; # n32 variant
|
"mips" = "btsmipn32"; # n32 variant
|
||||||
"mipsel" = "ltsmipn32"; # n32 variant
|
"mipsel" = "ltsmipn32"; # n32 variant
|
||||||
|
@ -312,7 +312,7 @@ stdenv.mkDerivation ({
|
|||||||
optional (!bootstrap) "--disable-bootstrap" ++
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
|
|
||||||
# Platform-specific flags
|
# Platform-specific flags
|
||||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++
|
||||||
optionals hostPlatform.isSunOS [
|
optionals hostPlatform.isSunOS [
|
||||||
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||||
# On Illumos/Solaris GNU as is preferred
|
# On Illumos/Solaris GNU as is preferred
|
||||||
|
@ -325,7 +325,7 @@ stdenv.mkDerivation ({
|
|||||||
optional (!bootstrap) "--disable-bootstrap" ++
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
|
|
||||||
# Platform-specific flags
|
# Platform-specific flags
|
||||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++
|
||||||
optionals hostPlatform.isSunOS [
|
optionals hostPlatform.isSunOS [
|
||||||
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||||
# On Illumos/Solaris GNU as is preferred
|
# On Illumos/Solaris GNU as is preferred
|
||||||
|
@ -324,7 +324,7 @@ stdenv.mkDerivation ({
|
|||||||
optional (!bootstrap) "--disable-bootstrap" ++
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
|
|
||||||
# Platform-specific flags
|
# Platform-specific flags
|
||||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++
|
||||||
optionals hostPlatform.isSunOS [
|
optionals hostPlatform.isSunOS [
|
||||||
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||||
# On Illumos/Solaris GNU as is preferred
|
# On Illumos/Solaris GNU as is preferred
|
||||||
|
@ -326,7 +326,7 @@ stdenv.mkDerivation ({
|
|||||||
optional (!bootstrap) "--disable-bootstrap" ++
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
|
|
||||||
# Platform-specific flags
|
# Platform-specific flags
|
||||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++
|
||||||
optionals hostPlatform.isSunOS [
|
optionals hostPlatform.isSunOS [
|
||||||
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||||
# On Illumos/Solaris GNU as is preferred
|
# On Illumos/Solaris GNU as is preferred
|
||||||
|
@ -289,7 +289,7 @@ stdenv.mkDerivation ({
|
|||||||
optional (!bootstrap) "--disable-bootstrap" ++
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
|
|
||||||
# Platform-specific flags
|
# Platform-specific flags
|
||||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++
|
||||||
optionals hostPlatform.isSunOS [
|
optionals hostPlatform.isSunOS [
|
||||||
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||||
# On Illumos/Solaris GNU as is preferred
|
# On Illumos/Solaris GNU as is preferred
|
||||||
|
@ -277,7 +277,7 @@ stdenv.mkDerivation ({
|
|||||||
optional (!bootstrap) "--disable-bootstrap" ++
|
optional (!bootstrap) "--disable-bootstrap" ++
|
||||||
|
|
||||||
# Platform-specific flags
|
# Platform-specific flags
|
||||||
optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++
|
optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++
|
||||||
optionals hostPlatform.isSunOS [
|
optionals hostPlatform.isSunOS [
|
||||||
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
"--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
|
||||||
# On Illumos/Solaris GNU as is preferred
|
# On Illumos/Solaris GNU as is preferred
|
||||||
|
@ -134,7 +134,7 @@ in stdenv.mkDerivation (rec {
|
|||||||
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
|
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = stdenv.isLinux && (!stdenv.isi686);
|
doCheck = stdenv.isLinux && (!stdenv.isx86_32);
|
||||||
|
|
||||||
checkTarget = "check-all";
|
checkTarget = "check-all";
|
||||||
|
|
||||||
|
@ -122,7 +122,9 @@ let
|
|||||||
# Utility flags to test the type of platform.
|
# Utility flags to test the type of platform.
|
||||||
inherit (hostPlatform)
|
inherit (hostPlatform)
|
||||||
isDarwin isLinux isSunOS isCygwin isFreeBSD isOpenBSD
|
isDarwin isLinux isSunOS isCygwin isFreeBSD isOpenBSD
|
||||||
isi686 isx86_64 is64bit isAarch32 isAarch64 isMips isBigEndian;
|
isi686 isx86_32 isx86_64
|
||||||
|
is32bit is64bit
|
||||||
|
isAarch32 isAarch64 isMips isBigEndian;
|
||||||
isArm = lib.warn
|
isArm = lib.warn
|
||||||
"`stdenv.isArm` is deprecated after 18.03. Please use `stdenv.isAarch32` instead"
|
"`stdenv.isArm` is deprecated after 18.03. Please use `stdenv.isAarch32` instead"
|
||||||
hostPlatform.isAarch32;
|
hostPlatform.isAarch32;
|
||||||
|
Loading…
Reference in New Issue
Block a user