This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][mips] Add support for mips*r6-*-musl
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: <nd at arm dot com>, Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Date: Wed, 24 Aug 2016 20:15:48 +0100
- Subject: [PATCH][mips] Add support for mips*r6-*-musl
- Authentication-results: sourceware.org; auth=none
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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.
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 --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"
#undef MUSL_DYNAMIC_LINKER64
-#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1"
-#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1"
+#define MUSL_DYNAMIC_LINKER64 \
+ "/lib/ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
+#define MUSL_DYNAMIC_LINKERN32 \
+ "/lib/ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1"
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
#define GNU_USER_DYNAMIC_LINKERN32 \