From 86a6d386d22d5bdd6144b95532e5de3bcff3c357 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Sun, 9 Jul 2023 16:12:11 -0400 Subject: [PATCH] Set up raspberry pi cross-compile tools --- .cargo/config.toml | 4 ++++ flake.nix | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..a4455de --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,4 @@ +[target.arm-unknown-linux-gnueabihf] +linker = "armv6l-unknown-linux-gnueabihf-gcc" +# rustflags = ["-C", "link-arg=-Wl,-dynamic-linker,/lib/ld-linux-armhf.so.3"] + diff --git a/flake.nix b/flake.nix index 1eab404..addb95a 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,10 @@ pkgs = import nixpkgs { system = "x86_64-linux"; }; pkgs-unstable = import unstable { system = "x86_64-linux"; }; cargo2nix = pkgs-cargo2nix.packages."x86_64-linux"; + armPkgs = import nixpkgs { + system = "x86_64-linux"; + crossSystem = pkgs.lib.systems.examples.raspberryPi; + }; in pkgs.mkShell { name = "ld-tools-devshell";