Add arm6vl (rpi) build

main
Brian Picciano 6 months ago
parent ada434032b
commit 0ed265db6f
  1. 13
      flake.nix

@ -23,6 +23,12 @@
rustTarget = "aarch64-unknown-linux-musl";
};
# Old Raspberry Pi's
"armv6l-linux" = {
crossSystemConfig = "armv6l-unknown-linux-musleabihf";
rustTarget = "arm-unknown-linux-musleabihf";
};
"x86_64-windows" = {
crossSystemConfig = "x86_64-w64-mingw32";
rustTarget = "x86_64-pc-windows-gnu";
@ -127,12 +133,15 @@
# Required because ring crate is special. This also seems to have
# fixed some issues with the x86_64-windows cross-compile :shrug:
TARGET_CC="${pkgsCross.stdenv.cc}/bin/${pkgsCross.stdenv.cc.targetPrefix}cc";
TARGET_CC = "${pkgsCross.stdenv.cc}/bin/${pkgsCross.stdenv.cc.targetPrefix}cc";
CARGO_BUILD_TARGET = rustTarget;
CARGO_BUILD_RUSTFLAGS = [
"-C" "target-feature=+crt-static"
"-C" "link-arg=-static"
# -latomic is required to build openssl-sys for armv6l-linux, but
# it doesn't seem to hurt any other builds.
"-C" "link-args=-static -latomic"
# https://github.com/rust-lang/cargo/issues/4133
"-C" "linker=${TARGET_CC}"

Loading…
Cancel
Save