aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2018-05-08 21:27:04 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2018-05-08 21:27:04 +0000
commit722ff179b65ddd851c97281c44d93ea1f4fc5f23 (patch)
tree3dcbb2a8bfc79217ae0e7d7432219e538450b9d6
parentdecf59373efcf2e6418c81ec85390e0dbe835708 (diff)
[PATCH] RISC-V: Use new linker emulations for glibc ABI.
gcc/ * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash. (LD_EMUL_SUFFIX): New. (LINK_SPEC): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260056 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/riscv/linux.h12
2 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7b9d5a3c461..56004866e9e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2018-05-08 Jim Wilson <jimw@sifive.com>
+
+ * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
+ (LD_EMUL_SUFFIX): New.
+ (LINK_SPEC): Use it.
+
2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
* doc/extend.texi (PowerPC Built-in Functions): Rename this
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
index aa8a28d5d31..85561846dad 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -30,7 +30,7 @@ along with GCC; see the file COPYING3. If not see
"%{mabi=ilp32d:}" \
"%{mabi=lp64:-sf}" \
"%{mabi=lp64f:-sp}" \
- "%{mabi=lp64d:}" \
+ "%{mabi=lp64d:}"
#undef MUSL_DYNAMIC_LINKER
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
@@ -49,8 +49,16 @@ along with GCC; see the file COPYING3. If not see
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
+#define LD_EMUL_SUFFIX \
+ "%{mabi=lp64d:}" \
+ "%{mabi=lp64f:_lp64f}" \
+ "%{mabi=lp64:_lp64}" \
+ "%{mabi=ilp32d:}" \
+ "%{mabi=ilp32f:_ilp32f}" \
+ "%{mabi=ilp32:_ilp32}"
+
#define LINK_SPEC "\
--melf" XLEN_SPEC "lriscv \
+-melf" XLEN_SPEC "lriscv" LD_EMUL_SUFFIX " \
%{mno-relax:--no-relax} \
%{shared} \
%{!shared: \