[Buildroot] Xtensa toolchain issue ?

Thomas Petazzoni thomas.petazzoni at bootlin.com
Fri Jan 4 09:27:35 UTC 2019


Hello Max,

As usual, thanks a lot for your feedback, very useful.

On Thu, 3 Jan 2019 14:17:51 -0800, Max Filippov wrote:

> My understanding is that this is not something that could be fixed
> in a generic way, but requires support from the compiler backend.
> Specifically it needs a way to tail-call a variadic function from a
> thunk,

This is intricate compiler stuff. If you have a bit of time to give a
few more details about this, I'd be interested. Of course, that's just
to satisfy my endless curiosity, so if you don't have time/interest,
you can skip this request :-)

> something that is not trivial to do on xtensa architecture.
> The corresponding test in the gcc test suite
> (gcc/testsuite/g++.old-deja/g++.jason/thunk3.C)
> has been disabled since 2002.
> 
> The test in the bug that you've referenced still fails on xtensa with
> gcc 8 and gcc 9.
> 
> I'll try to implement required support in the xtensa backend for the
> above to work.

Since the issue also happens on OpenRISC, perhaps we need to have some
BR2_TOOLCHAIN_SUPPORTS_XYZ boolean that says whether the gcc version
supports this specific stuff. However, since I don't clearly understand
what the issue is, I wouldn't be able to find a good name for that
BR2_TOOLCHAIN_SUPPORTS_XYZ option.

BR2_TOOLCHAIN_SUPPORTS_TAIL_CALL_VARIADIC_FUNC_FROM_THUNK ? :-)

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list