%{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. */
#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