Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/development/compilers/gcc/10/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ let majorVersion = "10";
patches =
optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional noSysDirs ../no-sys-dirs.patch
++ optional (noSysDirs && hostPlatform.isRiscV) ../no-sys-dirs-riscv.patch
/* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied
url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02";
sha256 = ""; # TODO: uncomment and check hash when available.
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/gcc/11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ let majorVersion = "11";
patches =
optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional noSysDirs ../no-sys-dirs.patch
++ optional (noSysDirs && hostPlatform.isRiscV) ../no-sys-dirs-riscv.patch
/* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied
url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02";
sha256 = ""; # TODO: uncomment and check hash when available.
Expand Down
12 changes: 12 additions & 0 deletions pkgs/development/compilers/gcc/no-sys-dirs-riscv.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -69,8 +69,4 @@

#define TARGET_ASM_FILE_END file_end_indicate_exec_stack

-#define STARTFILE_PREFIX_SPEC \
- "/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
- "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
- "/lib/ " \
- "/usr/lib/ "
+#define STARTFILE_PREFIX_SPEC ""
1 change: 1 addition & 0 deletions pkgs/stdenv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ in
powerpc-linux = /* stagesLinux */ stagesNative;
powerpc64-linux = stagesLinux;
powerpc64le-linux = stagesLinux;
riscv64-linux = stagesLinux;
x86_64-darwin = stagesDarwin;
aarch64-darwin = stagesDarwin;
x86_64-solaris = stagesNix;
Expand Down
12 changes: 12 additions & 0 deletions pkgs/stdenv/linux/bootstrap-files/riscv64.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
busybox = import <nix/fetchurl.nix> {
url = "http://tarballs.nixos.org/stdenv-linux/riscv64/9bd3cf0063b80428bd85a286205adab4b6ffcbd6/busybox";
sha256 = "6f61912f94bc4ef287d1ff48a9521ed16bd07d8d8ec775e471f32c64d346583d";
executable = true;
};

bootstrapTools = import <nix/fetchurl.nix> {
url = "http://tarballs.nixos.org/stdenv-linux/riscv64/9bd3cf0063b80428bd85a286205adab4b6ffcbd6/bootstrap-tools.tar.xz";
sha256 = "5466b19288e980125fc62ebb864d09908ffe0bc50cebe52cfee89acff14d5b9f";
};
}
1 change: 1 addition & 0 deletions pkgs/stdenv/linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
armv7l-linux = import ./bootstrap-files/armv7l.nix;
aarch64-linux = import ./bootstrap-files/aarch64.nix;
mipsel-linux = import ./bootstrap-files/loongson2f.nix;
riscv64-linux = import ./bootstrap-files/riscv64.nix;
};
musl = {
aarch64-linux = import ./bootstrap-files/aarch64-musl.nix;
Expand Down