Add riscv musl support.

gcc/
	Backport from mainline
	2017-11-07  Michael Clark  <michaeljclark@mac.com>

	* config/riscv/linux.h (MUSL_ABI_SUFFIX): New define.
	(MUSL_DYNAMIC_LINKER): Likewise.

From-SVN: r255216
This commit is contained in:
Jim Wilson 2017-11-28 19:48:30 +00:00 committed by Jim Wilson
parent a82d7ade2d
commit 2be42c93b9
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2017-11-28 Jim Wilson <jimw@sifive.com>
Backport from mainline
2017-11-07 Michael Clark <michaeljclark@mac.com>
* config/riscv/linux.h (MUSL_ABI_SUFFIX): New define.
(MUSL_DYNAMIC_LINKER): Likewise.
2017-11-27 Jim Wilson <jimw@sifive.com>
Backport from mainline

View File

@ -24,6 +24,17 @@ along with GCC; see the file COPYING3. If not see
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1"
#define MUSL_ABI_SUFFIX \
"%{mabi=ilp32:-sf}" \
"%{mabi=ilp32f:-sp}" \
"%{mabi=ilp32d:}" \
"%{mabi=lp64:-sf}" \
"%{mabi=lp64f:-sp}" \
"%{mabi=lp64d:}" \
#undef MUSL_DYNAMIC_LINKER
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
/* 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