From f707295646d409af271bcb3cbc3ee01cc8252f09 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 6 Jun 2019 00:07:53 +0800 Subject: [PATCH] use the GNU linker --- derivations.nix | 5 ----- shell-firmware.nix | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/derivations.nix b/derivations.nix index c3fbc37..f8519e6 100644 --- a/derivations.nix +++ b/derivations.nix @@ -20,11 +20,6 @@ rec { name = oa.name + "-riscv"; cmakeFlags = oa.cmakeFlags ++ ["-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=RISCV"]; }); - lld_7 = (pkgs.lld_7.overrideAttrs(oa: { - name = oa.name + "-riscv"; - })).override { - llvm = llvm_7; - }; rustc = (pkgs.rustc.overrideAttrs(oa: { name = "${oa.pname}-${oa.version}-riscv"; })).override { diff --git a/shell-firmware.nix b/shell-firmware.nix index 1fa2ca9..be9a9b5 100644 --- a/shell-firmware.nix +++ b/shell-firmware.nix @@ -3,6 +3,6 @@ let hx = import ./derivations.nix { inherit pkgs; }; in pkgs.mkShell { - buildInputs = [ hx.rustc hx.rust-riscv32imc-crates hx.lld_7 hx.cargo ]; - RUSTFLAGS="-L ${hx.rust-riscv32imc-crates}/lib/rustlib/riscv32imc-unknown-none-elf/lib -C linker=lld"; + buildInputs = [ hx.rustc hx.rust-riscv32imc-crates hx.binutils-riscv hx.cargo ]; + RUSTFLAGS="-L ${hx.rust-riscv32imc-crates}/lib/rustlib/riscv32imc-unknown-none-elf/lib -C linker=riscv32-unknown-elf-ld -C link-arg=-Tlink.x"; }