From 931a9c38d588f1d05410c371bbec61cc26d8f520 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 03 Apr 2019 20:53:53 -0500 Subject: [PATCH] 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 --- gcc/gcc/config/riscv/haiku.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/gcc/config/riscv/haiku.h b/gcc/gcc/config/riscv/haiku.h index b3568e9..1338375 100644 --- a/gcc/gcc/config/riscv/haiku.h +++ a/gcc/gcc/config/riscv/haiku.h @@ -43,10 +43,13 @@ "%{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" -- gitore 0.2.1