gmp: (Optionally) use --host=none-linux-gnu for generic library

This is suggested by GCC maintainer Andrew Pinski in
https://gcc.gnu.org/PR110789.  It's easier than what we've suggested
in the book.
This commit is contained in:
Xi Ruoyao 2023-07-27 13:06:49 +08:00
parent 49d402ee78
commit d0de26cbe0
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3

View File

@ -54,10 +54,12 @@
<para>The default settings of GMP produce libraries optimized for
the host processor. If libraries suitable for processors less
capable than the host's CPU are desired, generic libraries can be
created by running the following:
created by appending the <option>--host=none-linux-gnu</option> option
to the <command>configure</command> command.</para>
<screen role="nodump"><userinput>cp -v configfsf.guess config.guess
cp -v configfsf.sub config.sub</userinput></screen></para>
<!-- To editors: the configure script says "the none host is obsolete,
use - -disable-assembly", but don't believe it: with the latter
CFLAGS is still automatically set to -march=something. -->
</note>
<para>Prepare GMP for compilation:</para>
@ -106,7 +108,7 @@ make html</userinput></screen>
the system capabilities and there will be errors in the tests or other
applications using the gmp libraries with the message "Illegal
instruction". In this case, gmp should be reconfigured with the option
--build=x86_64-pc-linux-gnu and rebuilt.</para></caution>
<option>--host=none-linux-gnu</option> and rebuilt.</para></caution>
<para>Ensure that all 197 tests in the test suite passed.
Check the results by issuing the following command:</para>