[haiku-commits] buildtools: btrev43142 - gcc/gcc/config/riscv

  • From: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 3 Apr 2019 22:13:38 -0400 (EDT)

btrev43142 adds 1 changeset to branch 'master'
old head: c1627324616fe5b07cae87ae3d907443737606b9
new head: 931a9c38d588f1d05410c371bbec61cc26d8f520
overview: 
https://git.haiku-os.org/buildtools/log/?qt=range&q=931a9c38d588+%5Ec1627324616f

----------------------------------------------------------------------------

931a9c38d588: 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

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    btrev43142
Commit:      931a9c38d588f1d05410c371bbec61cc26d8f520
URL:         https://git.haiku-os.org/buildtools/commit/?id=931a9c38d588
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Thu Apr  4 01:53:53 2019 UTC

----------------------------------------------------------------------------

1 file changed, 6 insertions(+), 3 deletions(-)
gcc/gcc/config/riscv/haiku.h | 9 ++++++---

----------------------------------------------------------------------------

diff --git a/gcc/gcc/config/riscv/haiku.h b/gcc/gcc/config/riscv/haiku.h
index b3568e98ff..1338375554 100644
--- a/gcc/gcc/config/riscv/haiku.h
+++ b/gcc/gcc/config/riscv/haiku.h
@@ -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"
 


Other related posts:

  • » [haiku-commits] buildtools: btrev43142 - gcc/gcc/config/riscv - Alex von Gluck IV