Hi Steve, You're the lucky recipient of my first review so apologies for being slow and cautious...
I tried to find a reason why the files were originally separated like this and I can't see anything obvious. I assume you also found no reason. Presumably the separation was just to avoid disturbing the 32-bit configs but I think it is a sensible move to merge them. > --- a/gcc/config/mips/gnu-user.h > +++ b/gcc/config/mips/gnu-user.h > @@ -52,16 +52,20 @@ along with GCC; see the file COPYING3. If not see > #undef MIPS_DEFAULT_GVALUE > #define MIPS_DEFAULT_GVALUE 0 > > -/* Borrowed from sparc/linux.h */ > #undef GNU_USER_TARGET_LINK_SPEC > -#define GNU_USER_TARGET_LINK_SPEC \ > - "%(endian_spec) \ > - %{shared:-shared} \ > +#define GNU_USER_TARGET_LINK_SPEC "\ > +%{G*} %{EB} %{EL} %{!EB:%{!EL:%(endian_spec)}} %{mips*} \ > +%{shared} \ Indent two lines above. The '%{!EB:%{!EL:%(endian_spec)}}' is redundant as it is covered by the DRIVER_SELF_SPEC which you have added below. The linker won't accept -mips16 so you should use MIPS_ISA_LEVEL_OPTION_SPEC to avoid passing mips16. Although we still end up with an explicit list at least there is just one copy to maintain. > %{!shared: \ > %{!static: \ > %{rdynamic:-export-dynamic} \ > - -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \ > - %{static:-static}}" > + %{mabi=n32: -dynamic-linker " GNU_USER_DYNAMIC_LINKERN32 "} \ > + %{mabi=64: -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "} \ > + %{mabi=32: -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}} \ > + %{static:-static}} \ Very much a nit but if we are going to have %{shared} above then we should have just %{static} here. > +%{mabi=n32:-m" GNU_USER_LINK_EMULATIONN32 "} \ > +%{mabi=64:-m" GNU_USER_LINK_EMULATION64 "} \ > +%{mabi=32:-m" GNU_USER_LINK_EMULATION32 "}" > #undef LINK_SPEC > #define LINK_SPEC GNU_USER_TARGET_LINK_SPEC > > @@ -122,7 +126,9 @@ extern const char *host_detect_local_cpu (int argc, > const char **argv); > specs handling by removing a redundant option. */ > \ > "%{!mno-shared:%<mplt}", \ > /* -mplt likewise has no effect for -mabi=64 without -msym32. */ \ > - "%{mabi=64:%{!msym32:%<mplt}}" > + "%{mabi=64:%{!msym32:%<mplt}}" \ > + " %{!EB:%{!EL:%(endian_spec)}}" \ > + " %{!mabi=*: -" MULTILIB_ABI_DEFAULT "}" Another nit, since this code is being changed can you update this from using a leading space to be a comma separated list of strings like this: > + "%{mabi=64:%{!msym32:%<mplt}}", \ > + "%{!EB:%{!EL:%(endian_spec)}}", \ > + "%{!mabi=*: -" MULTILIB_ABI_DEFAULT "}" With those changes can you double check that a default big and default little endian build pass -EB/-EL respectively by default and are changed when using -EL/-EB explicitly? There should only be one -E* option passed to the linker theoretically, unless multiple explicit -E* options are given on the command line. Otherwise OK (assuming the link specs behave as described above). Thanks, Matthew