mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
mips64el: Fix nan encoding probe impreciseness with ieee754=emulated
The ieee754=emulated option was added in Linux 6.11, and with Linux >= 5.16 we can get the hardware nan encoding from /proc/cpuinfo. So we prefer the cpuinfo report, and only use the custom probe code if cpuinfo does not have the info (indicating an old kernel which cannot support ieee754=emulated).
This commit is contained in:
parent
44599dcb48
commit
42e78cc389
@ -86,7 +86,8 @@ int main()
|
||||
}</literal>
|
||||
EOF
|
||||
gcc nan2008.c -o nan2008
|
||||
if ./nan2008; then
|
||||
if ! grep -q nan_legacy /proc/cpuinfo &&
|
||||
(grep -q nan_2008 /proc/cpuinfo || ./nan2008) then
|
||||
NAN_SWITCH=--with-nan=2008
|
||||
fi</userinput></screen>
|
||||
|
||||
@ -226,13 +227,6 @@ fi</userinput></screen>
|
||||
<xref linkend='ch-tools-chroot'/> to fail), or produce bad results
|
||||
(causing test failures building some packages, for example Glibc
|
||||
and Python).</para>
|
||||
<!-- TODO: If the kernel is booted with ieee754=emulated, we'll
|
||||
be just using the default of the toolchain but that's not
|
||||
always the best. If the host toolchain already uses an NaN
|
||||
encoding different from the hardware FPU, the FPU will be
|
||||
disabled and all FP instructions are emulated by the kernel.
|
||||
That's obviously very slow. But I've not figured out a
|
||||
method to probe. -->
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user