Merge #318447: rustc: disable wasm32 if some gcc options are set

...into staging-next
This commit is contained in:
Vladimír Čunát 2024-06-09 08:36:41 +02:00
commit b45d7259e5
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
8 changed files with 25 additions and 2 deletions

View File

@ -92,5 +92,8 @@ rustPlatform.buildRustPackage rec {
license = licenses.gpl3Only;
maintainers = with maintainers; [ akru andresilva FlorianFranzen RaghavSood ];
platforms = platforms.unix;
# See comment about wasm32-unknown-unknown in rustc.nix.
broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] ||
!stdenv.hostPlatform.gcc.thumb or true;
};
}

View File

@ -120,6 +120,9 @@ rustPlatform.buildRustPackage rec {
license = licenses.mit;
maintainers = with maintainers; [ pbsds ];
platforms = platforms.unix;
# See comment about wasm32-unknown-unknown in rustc.nix.
broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] ||
!stdenv.hostPlatform.gcc.thumb or true;
mainProgram = "pagefind";
};
}

View File

@ -126,5 +126,8 @@ rustPlatform.buildRustPackage rec {
];
maintainers = with maintainers; [ SomeoneSerge ];
mainProgram = "rerun";
# See comment about wasm32-unknown-unknown in rustc.nix.
broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] ||
!stdenv.hostPlatform.gcc.thumb or true;
};
}

View File

@ -166,5 +166,8 @@ in stdenv.mkDerivation (finalAttrs: {
mainProgram = "surrealist";
maintainers = with maintainers; [ frankp ];
platforms = platforms.linux;
# See comment about wasm32-unknown-unknown in rustc.nix.
broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] ||
!stdenv.hostPlatform.gcc.thumb or true;
};
})

View File

@ -78,6 +78,9 @@ let
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ huantian wackbyte ];
platforms = lib.platforms.linux;
# See comment about wasm32-unknown-unknown in rustc.nix.
broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] ||
!stdenv.hostPlatform.gcc.thumb or true;
};
};

View File

@ -103,7 +103,9 @@ in stdenv.mkDerivation (finalAttrs: {
stdenv.targetPlatform.rust.rustcTargetSpec
# Other targets that don't need any extra dependencies to build.
] ++ optionals (!fastCross) [
# Temporarily broken if some global compiler flags are set:
# https://github.com/NixOS/nixpkgs/pull/317273
] ++ optionals (!fastCross && !lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] && stdenv.hostPlatform.gcc.thumb or true) [
"wasm32-unknown-unknown"
# (build!=target): When cross-building a compiler we need to add

View File

@ -84,6 +84,9 @@ in rustPlatform.buildRustPackage (commonDerivationAttrs // {
changelog = "https://github.com/lldap/lldap/blob/v${lldap.version}/CHANGELOG.md";
license = licenses.gpl3Only;
platforms = platforms.linux;
# See comment about wasm32-unknown-unknown in rustc.nix.
broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] ||
!stdenv.hostPlatform.gcc.thumb or true;
maintainers = with maintainers; [ bendlas ];
mainProgram = "lldap";
};

View File

@ -180,6 +180,9 @@ buildGoModule rec {
platforms = platforms.unix;
# go-libfido2 is broken on platforms with less than 64-bit because it defines an array
# which occupies more than 31 bits of address space.
broken = stdenv.hostPlatform.parsed.cpu.bits < 64;
broken = stdenv.hostPlatform.parsed.cpu.bits < 64 ||
# See comment about wasm32-unknown-unknown in rustc.nix.
lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] ||
!stdenv.hostPlatform.gcc.thumb or true;
};
}