ci: fix build error
All checks were successful
Build packages / build-packages (default) (push) Successful in 8m34s
All checks were successful
Build packages / build-packages (default) (push) Successful in 8m34s
This commit is contained in:
parent
57dde463fb
commit
c0de3e619e
4 changed files with 46 additions and 0 deletions
|
@ -5,6 +5,8 @@ set(CMAKE_CXX_STANDARD 17)
|
|||
set(CMAKE_C_STANDARD 17)
|
||||
|
||||
include(FindPkgConfig)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
pkg_check_modules(riscv-riscv REQUIRED IMPORTED_TARGET riscv-riscv)
|
||||
pkg_check_modules(riscv-fesvr REQUIRED IMPORTED_TARGET riscv-fesvr)
|
||||
find_package(spdlog REQUIRED)
|
||||
|
|
23
default.nix
Normal file
23
default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ stdenv
|
||||
, cmake
|
||||
, pkg-config
|
||||
, spike
|
||||
, mini-gdbstub
|
||||
, spdlog
|
||||
}: stdenv.mkDerivation {
|
||||
pname = "spike-diff";
|
||||
version = "0.0.1";
|
||||
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
mini-gdbstub
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
spike
|
||||
spdlog
|
||||
];
|
||||
}
|
19
flake.nix
19
flake.nix
|
@ -16,6 +16,23 @@
|
|||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; } // nur-xin.packages.${system};
|
||||
|
||||
spike = pkgs.spike.overrideAttrs (self: super: {
|
||||
pname = super.pname + "-rv32e";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "riscv-software-src";
|
||||
repo = "riscv-isa-sim";
|
||||
rev = "2890ea72125b69eb96bb0458a5bbc00ce26e8872";
|
||||
hash = "sha256-gCtTmq4GhxoZit8fqJT0+E4XJiltM2ArlmLkEyJ68vk=";
|
||||
};
|
||||
patches = [ ];
|
||||
configureFlags = [ "--with-isa=RV32E" "--enable-optional-subprojects" ];
|
||||
check = false;
|
||||
doInstallCheck = false;
|
||||
});
|
||||
|
||||
mini-gdbstub = nur-xin.packages.${system}.mini-gdbstub;
|
||||
in
|
||||
{
|
||||
checks = {
|
||||
|
@ -33,6 +50,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
packages.default = pkgs.callPackage ./default.nix { inherit spike mini-gdbstub; };
|
||||
|
||||
devShells.default = (pkgs.mkShell.override { stdenv = pkgs.ccacheStdenv; }) {
|
||||
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
||||
nativeBuildInputs = self.checks.${system}.pre-commit-check.enabledPackages;
|
||||
|
|
|
@ -7,3 +7,5 @@ target_link_libraries(spike-diff
|
|||
|
||||
set_property(TARGET PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
target_link_options(spike-diff PRIVATE -Wl,-E)
|
||||
|
||||
install( TARGETS spike-diff )
|
||||
|
|
Loading…
Add table
Reference in a new issue