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

Same as in gcc{10,11} (#147942).
main
Zhaofeng Li 2 years ago committed by GitHub
parent 49f09079d7
commit 2fca45565d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      pkgs/development/compilers/gcc/9/default.nix
  2. 17
      pkgs/development/compilers/gcc/no-sys-dirs-riscv-gcc9.patch

@ -82,6 +82,7 @@ let majorVersion = "9";
++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch
++ optional noSysDirs ../no-sys-dirs.patch
++ optional (noSysDirs && hostPlatform.isRiscV) ../no-sys-dirs-riscv-gcc9.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.

@ -0,0 +1,17 @@
diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h
index 701f5ea1544..8de333caf54 100644
--- a/gcc/config/riscv/riscv.h
+++ b/gcc/config/riscv/riscv.h
@@ -886,11 +886,7 @@ extern unsigned riscv_stack_boundary;
"%{mabi=lp64f:lp64f}" \
"%{mabi=lp64d:lp64d}" \
-#define STARTFILE_PREFIX_SPEC \
- "/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
- "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
- "/lib/ " \
- "/usr/lib/ "
+#define STARTFILE_PREFIX_SPEC ""
/* ISA constants needed for code generation. */
#define OPCODE_LW 0x2003
Loading…
Cancel
Save