/* Definitions of target machine of Andes NDS32 cpu for GNU compiler
- Copyright (C) 2012-2019 Free Software Foundation, Inc.
+ Copyright (C) 2012-2021 Free Software Foundation, Inc.
Contributed by Andes Technology Corporation.
This file is part of GCC.
} \
while (0)
-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+#ifdef TARGET_BIG_ENDIAN_DEFAULT
+#define LD_SO_ENDIAN_SPEC "%{mlittle-endian:le}%{!mlittle-endian:be}"
+#else
+#define LD_SO_ENDIAN_SPEC "%{mbig-endian:be}%{!mbig-endian:le}"
+#endif
+
+/* Record arch version in TARGET_ARCH_DEFAULT.
+ 0 means soft ABI;
+ 1 means hard ABI and using full floating-point instruction;
+ 2 means hard ABI and only using single-precision floating-point
+ instruction. */
+#if TARGET_ARCH_DEFAULT
+#define LD_SO_ABI_SPEC "%{!mabi=2:f}"
+#else
+#define LD_SO_ABI_SPEC "%{mabi=2fp+:f}"
+#endif
+
+#define GLIBC_DYNAMIC_LINKER \
+ "/lib/ld-linux-nds32" LD_SO_ENDIAN_SPEC LD_SO_ABI_SPEC ".so.1"
/* In the configure stage we may use options --enable-default-relax,
--enable-Os-default-ifc and --enable-Os-default-ex9. They effect