[NDS32] Change naming rule for dyanmic linker.
authorKito Cheng <kito.cheng@gmail.com>
Mon, 4 Feb 2019 09:00:24 +0000 (09:00 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Mon, 4 Feb 2019 09:00:24 +0000 (09:00 +0000)
gcc/
* config/nds32/linux.h (GLIBC_DYNAMIC_LINKER): Define the naming rule
of the dynamic linker: "ld-linux-nds32[le|be][f].so.1".

From-SVN: r268512

gcc/ChangeLog
gcc/config/nds32/linux.h

index da8106ba36d3eb42a2cf9721ba61e10a9d13b37b..04288c878c0a95d8980f622a27cbbbd959ac1cd5 100644 (file)
@@ -1,3 +1,8 @@
+2019-02-04  Kito Cheng  <kito.cheng@gmail.com>
+
+       * config/nds32/linux.h (GLIBC_DYNAMIC_LINKER): Define the naming rule
+       of the dynamic linker: "ld-linux-nds32[le|be][f].so.1".
+
 2019-02-04  Chung-Ju Wu  <jasonwucj@gmail.com>
 
        * config/nds32/nds32.c (nds32_legitimate_address_p): Add TLS model
index 36579d057095a5a4173609617b2d7255693e44fe..7fc1b374611f9d6dd4d9a3ad28ba85d09ee0acda 100644 (file)
     }                                           \
   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