From 934127e8f171c26242a8d5ad3e8f871ca5a48a29 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Sun, 3 Apr 2022 12:03:13 -0500 Subject: [PATCH] gcc/riscv: Align Haiku spec to gcc 11 design Change-Id: I6f67c79ddefe85a7d1e8773e88f50cd3b70a4f80 Reviewed-on: https://review.haiku-os.org/c/buildtools/+/5444 Reviewed-by: Adrien Destugues --- gcc/gcc/config/riscv/haiku.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/gcc/config/riscv/haiku.h b/gcc/gcc/config/riscv/haiku.h index 9b31a4dc3d..205c8fddd2 100644 --- a/gcc/gcc/config/riscv/haiku.h +++ b/gcc/gcc/config/riscv/haiku.h @@ -41,7 +41,15 @@ along with GCC; see the file COPYING3. If not see "%{mabi=ilp32d:}" \ "%{mabi=lp64:-sf}" \ "%{mabi=lp64f:-sp}" \ + "%{mabi=lp64d:}" + +#define LD_EMUL_SUFFIX \ "%{mabi=lp64d:}" \ + "%{mabi=lp64f:_lp64f}" \ + "%{mabi=lp64:_lp64}" \ + "%{mabi=ilp32d:}" \ + "%{mabi=ilp32f:_ilp32f}" \ + "%{mabi=ilp32:_ilp32}" #undef LIB_SPEC // Linux adds -latomic because RISC-V only has word-sized atomics @@ -54,4 +62,4 @@ along with GCC; see the file COPYING3. If not see #define ICACHE_FLUSH_FUNC "__riscv_flush_icache" #undef LINK_SPEC -#define LINK_SPEC "-melf" XLEN_SPEC "lriscv %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}} -X" +#define LINK_SPEC "-melf" XLEN_SPEC DEFAULT_ENDIAN_SPEC "riscv" LD_EMUL_SUFFIX " %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}} -X"