aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/riscv/elf.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/riscv/elf.h')
-rw-r--r--gcc/config/riscv/elf.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/config/riscv/elf.h b/gcc/config/riscv/elf.h
index f0e865d..f3d767c 100644
--- a/gcc/config/riscv/elf.h
+++ b/gcc/config/riscv/elf.h
@@ -27,10 +27,14 @@ along with GCC; see the file COPYING3. If not see
/* Link against Newlib libraries, because the ELF backend assumes Newlib.
Handle the circular dependence between libc and libgloss. */
#undef LIB_SPEC
-#define LIB_SPEC "--start-group -lc %{!specs=nosys.specs:-lgloss} --end-group"
+#define LIB_SPEC \
+ "--start-group -lc %{!specs=nosys.specs:-lgloss} --end-group " \
+ "%{!nostartfiles:%{!nodefaultlibs:%{!nolibc:%{!nostdlib:%:riscv_multi_lib_check()}}}}"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crt0%O%s crtbegin%O%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend%O%s"
+
+#define RISCV_USE_CUSTOMISED_MULTI_LIB 1