gcc9: Add no-sys-dir patch for RISC-V (#154230)

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

authored by Zhaofeng Li and committed by GitHub 2fca4556 49f09079

+18
+1
pkgs/development/compilers/gcc/9/default.nix
··· 82 ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch 83 ++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch 84 ++ optional noSysDirs ../no-sys-dirs.patch 85 /* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied 86 url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02"; 87 sha256 = ""; # TODO: uncomment and check hash when available.
··· 82 ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch 83 ++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch 84 ++ optional noSysDirs ../no-sys-dirs.patch 85 + ++ optional (noSysDirs && hostPlatform.isRiscV) ../no-sys-dirs-riscv-gcc9.patch 86 /* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied 87 url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02"; 88 sha256 = ""; # TODO: uncomment and check hash when available.
+17
pkgs/development/compilers/gcc/no-sys-dirs-riscv-gcc9.patch
···
··· 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