bcachefs-tools: fix riscv build (#550473)

This commit is contained in:
Masum Reza
2026-08-11 07:46:55 +00:00
committed by GitHub

View File

@@ -113,6 +113,12 @@ stdenv.mkDerivation (finalAttrs: {
"CARGO_TARGET_${stdenv.hostPlatform.rust.cargoEnvVarTarget}_LINKER" = "${stdenv.cc.targetPrefix}cc";
};
# Workaround for RISCV cross-compilation issue
# https://github.com/koverstreet/bcachefs-tools/issues/850
preBuild = lib.optionalString stdenv.hostPlatform.isRiscV ''
export BINDGEN_EXTRA_CLANG_ARGS="$BINDGEN_EXTRA_CLANG_ARGS --target=riscv64-unknown-linux-gnu -march=rv64gc"
'';
# FIXME: Try enabling this once the default linux kernel is at least 6.7
doCheck = false; # needs bcachefs module loaded on builder