[PATCH] MIPS: gas: alter 64 or 32 for r6 triples if march is implicit

Jiaxun Yang jiaxun.yang@flygoat.com
Sun May 7 18:34:52 GMT 2023



> 2023年5月7日 19:17,Maciej W. Rozycki <macro@orcam.me.uk> 写道:
> 
> On Sat, 6 May 2023, Jiaxun Yang wrote:
> 
>>>> Hmm, why people wants to build n32 binary on mips32r6 CPU?
>>> 
>>> I guess o32 toolchain should not work only for 32bit CPU?
>> 
>> In this case people should override -march option themself, not rely on random
>> toolchain hacks, since it’s not determinant from user’s perspective what “fallback”
>> march it will be, especially in case the toolchain is not designed for base ISA.
> 
> Seconded.  If anyhow, I'd suggest changing the arrangement the GCC way, 
> that is by adding `--with-arch-32=' and `--with-arch-64=' configuration 
> options.  I'm not terribly convinced however that would be a worthwhile 
> improvement, because GAS shouldn't normally be invoked directly, and when 
> called via the GCC driver the driver will do the right thing.
> 
> YunQiang, do you actually have a use case for invoking GAS directly?  I 
> only do it when debugging GAS, which is sort of irrelevant.  For normal 
> compilations I never do it.

The issue was raised by Glib[1], they are involving `ld` directly.

I recall v8 was generating embedded data as assembly directives and then invoking as to
generate object file. They claimed it’s faster than GCC.

I think it make sense to get this “workaround” done in GAS/LD, but not in this way.
 `--with-arch-32=' and `--with-arch-64=` method fits the purpose better. 

Thanks
Jiaxun

[1]: https://gitlab.gnome.org/GNOME/glib/-/issues/2768
> 
>  Maciej



More information about the Binutils mailing list