[Buildroot] [PATCH] arch: move global and rename variable BR2_PACKAGE_Z3_ARCH_SUPPORTS

Julien Olivain ju.o at free.fr
Thu Feb 9 19:36:07 UTC 2023


   Hi Giulio,

On 09/02/2023 01:48, Giulio Benetti wrote:
> Package quickjs fails to build on architectures that don't support full
> float rounding. To support all kind of float rounding FE_DOWNWARD,
> FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD must be defined in fenv.h.
> Since package z3 locally implements this check let's make it global,
> rename it to be generic and use it for both package quickjs and z3.
> 
> Fixes:
> http://autobuild.buildroot.net/results/0b6/0b67381e3643c134c92cbcd1c5dc258fd760cd7e/
> http://autobuild.buildroot.net/results/cf2/cf249a82c83d3c8503205f4c3c5859dd9d52afdf/
> http://autobuild.buildroot.net/results/9b3/9b37c6c55a5b468657af26ef9b57d4fe24d8fde2/
> http://autobuild.buildroot.net/results/4f1/4f13cf7d353260c6b8934dbdcf267bea884b356b/
> 
> Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>

To comment a bit on that, the complete condition is a bit more tricky:
- the CPU arch FPU HW must have all 4 rounding modes,
- the libc must expose a fenv.h header,
- the libc must also expose all 4 rouding modes.

glibc generally exposes all the HW supported rounding modes.  I
initially excluded uclibc-ng, because in its Buildroot default
configuration, fenv.h is not enabled [1]. I believe it's possible to
have some uclibc-ng configuration that are enable and exposing those
rounding modes. See [2].

So this proposal is correct but possibly discard the case in which libc 
is
uclibc-ng and its (custom) configuration exposes all FE rounding modes.

I am not sure if it's really an issue, as packages with such
requirements are mostly tested with glibc anyway...

Best regards,

Julien.

[1] 
https://git.busybox.net/buildroot/tree/package/uclibc/uClibc-ng.config
[2] 
https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/extra/Configs/Config.in.arch?h=v1.0.42#n180



More information about the buildroot mailing list