git.iko.soy/typeable/nixpkgs
on master help sign in
gcc9: Add no-sys-dir patch for RISC-V (#154230)

Same as in gcc{10,11} (#147942).

commit2fca45565d7ea04ebb22c0793848e5a10f2509b6 authorZhaofeng Li <hello@zhaofeng.li> dateWed 12 Jan 2022, 03:27 (5 years ago) parent49f0907
2 files changed+18
pkgs/development/compilers/gcc/9/default.nix+1 pkgs/development/compilers/gcc/no-sys-dirs-riscv-gcc9.patch+17
pkgs/development/compilers/gcc/9/default.nix+1
@@ -82,6 +82,7 @@ let majorVersion = "9";
8282 ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
8383 ++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch
8484 ++ optional noSysDirs ../no-sys-dirs.patch
85+ ++ optional (noSysDirs && hostPlatform.isRiscV) ../no-sys-dirs-riscv-gcc9.patch
8586 /* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied
8687 url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02";
8788 sha256 = ""; # TODO: uncomment and check hash when available.
pkgs/development/compilers/gcc/no-sys-dirs-riscv-gcc9.patchnew file+17
@@ -0,0 +1,17 @@
1+diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h
2+index 701f5ea1544..8de333caf54 100644
3+--- a/gcc/config/riscv/riscv.h
4++++ b/gcc/config/riscv/riscv.h
5+@@ -886,11 +886,7 @@ extern unsigned riscv_stack_boundary;
6+ "%{mabi=lp64f:lp64f}" \
7+ "%{mabi=lp64d:lp64d}" \
8+
9+-#define STARTFILE_PREFIX_SPEC \
10+- "/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
11+- "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
12+- "/lib/ " \
13+- "/usr/lib/ "
14++#define STARTFILE_PREFIX_SPEC ""
15+
16+ /* ISA constants needed for code generation. */
17+ #define OPCODE_LW 0x2003