Message ID | 55354AFD.3000108@arm.com |
---|---|
State | New |
Headers | show |
> On Apr 20, 2015, at 11:52 AM, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote: > > Set up dynamic linker name for aarch64. > > gcc/Changelog: > > 2015-04-16 Gregor Richards <gregor.richards@uwaterloo.ca> > Szabolcs Nagy <szabolcs.nagy@arm.com> > > * config/aarch64/aarch64-linux.h (MUSL_DYNAMIC_LINKER): Define. I don't think you need to check if defaulting to little or big-endian here are the specs always have one or the other passing through. Also if musl does not support ilp32, you might want to error out. Or even define the dynamic linker name even before support goes into musl. Thanks, Andrew > <03-aarch64.patch>
On 21/04/15 15:16, pinskia@gmail.com wrote: > > I don't think you need to check if defaulting to little or big-endian here are the specs always have one or the other passing through. > i was not aware of this may be the ifdef is not necessary for other archs either i will check > Also if musl does not support ilp32, you might want to error out. Or even define the dynamic linker name even before support goes into musl. > ok, i guess adding %{mabi=ilp32:_ilp32} won't hurt us
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h index 9abb252..5ff83dd 100644 --- a/gcc/config/aarch64/aarch64-linux.h +++ b/gcc/config/aarch64/aarch64-linux.h @@ -23,6 +23,14 @@ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" +#if TARGET_BIG_ENDIAN_DEFAULT +#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:_be}" +#else +#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:_be}" +#endif +#define MUSL_DYNAMIC_LINKER \ + "/lib/ld-musl-aarch64" MUSL_DYNAMIC_LINKER_E ".so.1" + #undef ASAN_CC1_SPEC #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"