riscv64: Fix startfile spec which breaks sysroot

* STARTFILE_PREFIX_SPEC is defined to /usr,/lib,etc on riscv.h
  which seems to override the sysroot paths for libraries.

Change-Id: Ia6b785ba1e5421a86227204b73b90496fb1af3ff
This commit is contained in:
Alexander von Gluck IV
2019-04-03 20:53:53 -05:00
parent c162732461
commit 931a9c38d5

View File

@@ -43,10 +43,13 @@ along with GCC; see the file COPYING3. If not see
"%{mabi=lp64f:-sp}" \
"%{mabi=lp64d:}" \
/* Because RISC-V only has word-sized atomics, it requries libatomic where
others do not. So link libatomic by default, as needed. */
#undef LIB_SPEC
#define LIB_SPEC " -lroot -latomic "
// Linux adds -latomic because RISC-V only has word-sized atomics
// Not sure if we really need it though.
#define LIB_SPEC " -lroot "
// riscv.h defines /lib and friends which breaks the sysroot
#undef STARTFILE_PREFIX_SPEC
#define ICACHE_FLUSH_FUNC "__riscv_flush_icache"