rust: it's broken on non-SSE2 i686

This commit is contained in:
Xi Ruoyao 2022-08-29 11:27:14 +08:00
parent 96923efd52
commit c0dfeeaf5e
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3

View File

@ -34,6 +34,31 @@
<sect2 role="package">
<title>Introduction to Rust</title>
<note>
<para>
Currently Rust compiler produces SSE2 instructions for 32-bit x86,
causing the generated code broken on 32-bit systems without a
SSE2-capable processor. All x86 processor models released after
2004 should be SSE2-capable. Run
<command>lscpu | grep sse2</command> as a test. If it outputs
anything, your CPU is SSE2-capable and OK. Otherwise you may try
to build this package <emphasis>on a SSE2-capable system</emphasis>
with the following fix applied:
</para>
<!-- computeroutput used deliberately to stop anyone from copying
blindly -->
<screen role="nodump"><computeroutput>sed 's@pentium4@pentiumpro@' -i \
compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs</computeroutput></screen>
<para>
And copy the resulted
<filename class="directory">/opt/rustc-&rust-version;</filename>
to the system without SSE2 capability. But this change is still
under upstream review and not tested by BLFS editors.
</para>
</note>
<para>
The <application>Rust</application> programming language is designed
to be a safe, concurrent, practical language.