diff mbox

[mips] Add support for mips*r6-*-musl

Message ID 6D39441BF12EF246A7ABCE6654B023537E4C6D1A@HHMAIL01.hh.imgtec.org
State New
Headers show

Commit Message

Matthew Fortune Aug. 25, 2016, 1:58 p.m. UTC
Szabolcs Nagy <szabolcs.nagy@arm.com> writes:
> Add the musl dynamic linker names for mips r6.

> 

> It seems DRIVER_SELF_SPECS sets the default mips isa

> (MIPS_DEFAULT_ISA_LEVEL_SPEC) on *-mti-linux* or *-mti-elf, but not on

> gnu linux targets (see config/mips/mti-linux.h vs config/mips/gnu-

> user.h).

>

> Is that ok? It seems broken, but i didn't try to fix that.


The default ISA for a non-vendor configuration normally comes from a
--with-arch=<blah> configure time option which gets injected irrespective
of the MIPS_ISA_DEFAULT option. You are right that there is an
inconsistency where the driver self-specs are not aware of the default
ISA when it is specified as part of the cpu in the triple.  I generally
advise people to specify the target ISA via --with-arch so hopefully most
people won't be affected. I'll look at fixing this when I do some multilib
work I have pending.

> If the toolchain is configured with mipsisa32r6-linux-musl the dynlinker

> name is wrong unless one explicitly passes

> -mips32r6 to gcc (same for the assembler and linker: they don't get -

> mips32r6 by default).

> 

> gcc/

> 2016-08-24  Szabolcs Nagy  <szabolcs.nagy@arm.com>

> 

> 	* config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Update.

> 	(MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Update.
diff mbox

Patch

diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
index fa253b6..2d79715 100644
--- a/gcc/config/mips/linux.h
+++ b/gcc/config/mips/linux.h
@@ -38,10 +38,13 @@  along with GCC; see the file COPYING3.  If not see
   "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
 
 #undef MUSL_DYNAMIC_LINKER32
-#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
+#define MUSL_DYNAMIC_LINKER32 \
+  "/lib/ld-musl-mips%{mips32r6:r6}%{EL:el}%{msoft-float:-sf}.so.1

This should be %{mips32r6|mips64r6:r6} as you can target o32 from a 64-bit
architecture.

Otherwise, OK.

Thanks for the patch,
Matthew