]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/mips/linux.h
install.texi (--with-mips-plt): Document.
[thirdparty/gcc.git] / gcc / config / mips / linux.h
index 90cf63df23c18521990100255dd58a01dfe24d35..b30289741fe136e1d99243f789f720a8d31c1a1f 100644 (file)
@@ -79,7 +79,8 @@ along with GCC; see the file COPYING3.  If not see
         %{static:-static}}}"
 
 #undef SUBTARGET_ASM_SPEC
-#define SUBTARGET_ASM_SPEC "%{mabi=64: -64} %{!mno-abicalls:-KPIC}"
+#define SUBTARGET_ASM_SPEC \
+  "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}}"
 
 /* The MIPS assembler has different syntax for .set. We set it to
    .dummy to trap any errors.  */
@@ -134,6 +135,11 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
 #endif
 
 #define BASE_DRIVER_SELF_SPECS \
-  NO_SHARED_SPECS \
-  MARCH_MTUNE_NATIVE_SPECS
+  NO_SHARED_SPECS                                                      \
+  MARCH_MTUNE_NATIVE_SPECS,                                            \
+  /* -mplt has no effect without -mno-shared.  Simplify later          \
+     specs handling by removing a redundant option.  */                        \
+  "%{!mno-shared:%<mplt}",                                             \
+  /* -mplt likewise has no effect for -mabi=64 without -msym32.  */    \
+  "%{mabi=64:%{!msym32:%<mplt}}"
 #define DRIVER_SELF_SPECS BASE_DRIVER_SELF_SPECS