mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
Rewrote a cumbersome sentence to make it clearer. Capitalized the
names of packages. Clarified verbiage in re PIE & ASLR. Improved the description of SSP, and tightened it up. Clarified the instructions for running tests concurrently. Modified descriptions of tests that fail. Patched up punctuation. Spelled "set up" correctly: "setup" is a noun. The phrasal verb used here is spelled as two words. Use the word "directives" to describe "#include" and similar preprocessor instructions. Add periods to some otherwise complete sentences.
This commit is contained in:
parent
66d32d7e29
commit
30f3041a7d
@ -80,8 +80,8 @@ cd build</userinput></screen>
|
|||||||
--disable-bootstrap \
|
--disable-bootstrap \
|
||||||
--with-system-zlib</userinput></screen>
|
--with-system-zlib</userinput></screen>
|
||||||
|
|
||||||
<para>Note that for other programming languages there are some prerequisites that
|
<para>GCC supports seven different computer languages, but the
|
||||||
are not yet available. See the
|
prerequisites for most of them have not yet been installed. See the
|
||||||
<ulink url="&blfs-book;general/gcc.html">BLFS Book GCC page</ulink>
|
<ulink url="&blfs-book;general/gcc.html">BLFS Book GCC page</ulink>
|
||||||
for instructions on how to build all of GCC's supported languages.</para>
|
for instructions on how to build all of GCC's supported languages.</para>
|
||||||
|
|
||||||
@ -91,8 +91,8 @@ cd build</userinput></screen>
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>LD=ld</parameter></term>
|
<term><parameter>LD=ld</parameter></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>This parameter makes the configure script use the ld installed
|
<para>This parameter makes the configure script use the ld program installed
|
||||||
by the binutils built earlier in this chapter, rather than
|
by the Binutils package built earlier in this chapter, rather than
|
||||||
the cross-built version which would otherwise be used.</para>
|
the cross-built version which would otherwise be used.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -101,7 +101,7 @@ cd build</userinput></screen>
|
|||||||
<term><parameter>--with-system-zlib</parameter></term>
|
<term><parameter>--with-system-zlib</parameter></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>This switch tells GCC to link to the system installed copy of
|
<para>This switch tells GCC to link to the system installed copy of
|
||||||
the zlib library, rather than its own internal copy.</para>
|
the Zlib library, rather than its own internal copy.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
@ -109,21 +109,21 @@ cd build</userinput></screen>
|
|||||||
<note>
|
<note>
|
||||||
<anchor id="pie-ssp-info" xreflabel="note on PIE and SSP"/>
|
<anchor id="pie-ssp-info" xreflabel="note on PIE and SSP"/>
|
||||||
<para>
|
<para>
|
||||||
PIE (position-independent executable) is a technique to produce
|
PIE (position-independent executables) are
|
||||||
binary programs that can be loaded anywhere in memory. Without PIE,
|
binary programs that can be loaded anywhere in memory. Without PIE,
|
||||||
the security feature named ASLR (Address Space Layout Randomization)
|
the security feature named ASLR (Address Space Layout Randomization)
|
||||||
can be applied for the shared libraries, but not the executable
|
can be applied for the shared libraries, but not for the executables
|
||||||
itself. Enabling PIE allows ASLR for the executables in addition to
|
themselves. Enabling PIE allows ASLR for the executables in addition to
|
||||||
the shared libraries, and mitigates some attacks based on fixed
|
the shared libraries, and mitigates some attacks based on fixed
|
||||||
addresses of sensitive code or data in the executables.
|
addresses of sensitive code or data in the executables.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
SSP (Stack Smashing Protection) is a technique to ensure
|
SSP (Stack Smashing Protection) is a technique to ensure
|
||||||
that the parameter stack is not corrupted. Stack corruption can
|
that the parameter stack is not corrupted. Stack corruption can,
|
||||||
for example alter the return address of a subroutine,
|
for example, alter the return address of a subroutine,
|
||||||
which would allow transferring control to some dangerous code
|
thus transferring control to some dangerous code
|
||||||
(existing in the program or shared libraries, or injected by the
|
(existing in the program or shared libraries, or injected by the
|
||||||
attacker somehow) instead of the original one.
|
attacker somehow).
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
@ -133,10 +133,10 @@ cd build</userinput></screen>
|
|||||||
|
|
||||||
<important>
|
<important>
|
||||||
<para>In this section, the test suite for GCC is considered
|
<para>In this section, the test suite for GCC is considered
|
||||||
important, but it takes a long time. First time builders are
|
important, but it takes a long time. First-time builders are
|
||||||
encouraged to not skip it. The time to run the tests can be
|
encouraged to run the test suite. The time to run the tests can be
|
||||||
reduced significantly by adding -jx to the make command below
|
reduced significantly by adding -jx to the <command>make -k check</command> command below,
|
||||||
where x is the number of cores on your system.</para>
|
where x is the number of CPU cores on your system.</para>
|
||||||
</important>
|
</important>
|
||||||
|
|
||||||
<para>One set of tests in the GCC test suite is known to exhaust the default
|
<para>One set of tests in the GCC test suite is known to exhaust the default
|
||||||
@ -149,23 +149,23 @@ cd build</userinput></screen>
|
|||||||
<screen><userinput remap="test">chown -Rv tester .
|
<screen><userinput remap="test">chown -Rv tester .
|
||||||
su tester -c "PATH=$PATH make -k check"</userinput></screen>
|
su tester -c "PATH=$PATH make -k check"</userinput></screen>
|
||||||
|
|
||||||
<para>To receive a summary of the test suite results, run:</para>
|
<para>To extract a summary of the test suite results, run:</para>
|
||||||
|
|
||||||
<screen><userinput remap="test">../contrib/test_summary</userinput></screen>
|
<screen><userinput remap="test">../contrib/test_summary</userinput></screen>
|
||||||
|
|
||||||
<para>For only the summaries, pipe the output through
|
<para>To filter out only the summaries, pipe the output through
|
||||||
<userinput>grep -A7 Summ</userinput>.</para>
|
<userinput>grep -A7 Summ</userinput>.</para>
|
||||||
|
|
||||||
<para>Results can be compared with those located at <ulink
|
<para>Results can be compared with those located at <ulink
|
||||||
url="&test-results;"/> and
|
url="&test-results;"/> and
|
||||||
<ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para>
|
<ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para>
|
||||||
|
|
||||||
<para>In gcc, eleven tests, in the i386 test suite are known to FAIL.
|
<para>Eleven tests in the i386 test suite for the gcc compiler are known to FAIL.
|
||||||
It's because the test files do not account for the
|
It's because the test files do not account for the
|
||||||
<parameter>--enable-default-pie</parameter> option.</para>
|
<parameter>--enable-default-pie</parameter> option.</para>
|
||||||
|
|
||||||
<para>In g++, four tests related to PR100400 are known to be reported
|
<para>Four tests related to PR100400 may be reported
|
||||||
as both XPASS and FAIL. It's because the test file for this known issue
|
as both XPASS and FAIL when testing the g++ compiler; the test file
|
||||||
is not well written.</para>
|
is not well written.</para>
|
||||||
|
|
||||||
<para>A few unexpected failures cannot always be avoided. The GCC developers
|
<para>A few unexpected failures cannot always be avoided. The GCC developers
|
||||||
@ -187,8 +187,8 @@ su tester -c "PATH=$PATH make -k check"</userinput></screen>
|
|||||||
<screen><userinput remap="install">make install</userinput></screen>
|
<screen><userinput remap="install">make install</userinput></screen>
|
||||||
|
|
||||||
<para>The GCC build directory is owned by <systemitem class="username">
|
<para>The GCC build directory is owned by <systemitem class="username">
|
||||||
tester</systemitem> now and the ownership of the installed header
|
tester</systemitem> now, and the ownership of the installed header
|
||||||
directory (and its content) will be incorrect. Change the ownership to
|
directory (and its content) is incorrect. Change the ownership to the
|
||||||
<systemitem class="username">root</systemitem> user and group:</para>
|
<systemitem class="username">root</systemitem> user and group:</para>
|
||||||
|
|
||||||
<screen><userinput remap="install">chown -v -R root:root \
|
<screen><userinput remap="install">chown -v -R root:root \
|
||||||
@ -274,7 +274,7 @@ SEARCH_DIR("/usr/local/lib")
|
|||||||
SEARCH_DIR("/lib")
|
SEARCH_DIR("/lib")
|
||||||
SEARCH_DIR("/usr/lib");</computeroutput></screen>
|
SEARCH_DIR("/usr/lib");</computeroutput></screen>
|
||||||
|
|
||||||
<para>A 32-bit system may see a few different directories. For example, here
|
<para>A 32-bit system may use a few other directories. For example, here
|
||||||
is the output from an i686 machine:</para>
|
is the output from an i686 machine:</para>
|
||||||
|
|
||||||
<screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")
|
<screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")
|
||||||
@ -307,7 +307,7 @@ SEARCH_DIR("/usr/lib");</computeroutput></screen>
|
|||||||
at all, then something is seriously wrong. Investigate and retrace the
|
at all, then something is seriously wrong. Investigate and retrace the
|
||||||
steps to find out where the problem is and correct it. <!--The most likely
|
steps to find out where the problem is and correct it. <!--The most likely
|
||||||
reason is that something went wrong with the specs file adjustment.--> Any
|
reason is that something went wrong with the specs file adjustment.--> Any
|
||||||
issues will need to be resolved before continuing with the process.</para>
|
issues should be resolved before continuing with the process.</para>
|
||||||
|
|
||||||
<para>Once everything is working correctly, clean up the test files:</para>
|
<para>Once everything is working correctly, clean up the test files:</para>
|
||||||
|
|
||||||
@ -374,7 +374,7 @@ mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
|
|||||||
<term><command>cpp</command></term>
|
<term><command>cpp</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The C preprocessor; it is used by the compiler to expand the
|
<para>The C preprocessor; it is used by the compiler to expand the
|
||||||
#include, #define, and similar statements in the source files</para>
|
#include, #define, and similar directives in the source files</para>
|
||||||
<indexterm zone="ch-system-gcc cpp">
|
<indexterm zone="ch-system-gcc cpp">
|
||||||
<primary sortas="b-cpp">cpp</primary>
|
<primary sortas="b-cpp">cpp</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
@ -407,7 +407,7 @@ mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
|
|||||||
<para>A wrapper around <command>ar</command> that adds a
|
<para>A wrapper around <command>ar</command> that adds a
|
||||||
plugin to the command line. This program is only used
|
plugin to the command line. This program is only used
|
||||||
to add "link time optimization" and is not useful with the
|
to add "link time optimization" and is not useful with the
|
||||||
default build options</para>
|
default build options.</para>
|
||||||
<indexterm zone="ch-system-gcc gcc-ar">
|
<indexterm zone="ch-system-gcc gcc-ar">
|
||||||
<primary sortas="b-gcc-ar">gc-ar</primary>
|
<primary sortas="b-gcc-ar">gc-ar</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
@ -420,7 +420,7 @@ mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
|
|||||||
<para>A wrapper around <command>nm</command> that adds a
|
<para>A wrapper around <command>nm</command> that adds a
|
||||||
plugin to the command line. This program is only used
|
plugin to the command line. This program is only used
|
||||||
to add "link time optimization" and is not useful with the
|
to add "link time optimization" and is not useful with the
|
||||||
default build options</para>
|
default build options.</para>
|
||||||
<indexterm zone="ch-system-gcc gcc-nm">
|
<indexterm zone="ch-system-gcc gcc-nm">
|
||||||
<primary sortas="b-gcc-nm">gc-nm</primary>
|
<primary sortas="b-gcc-nm">gc-nm</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
@ -433,7 +433,7 @@ mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
|
|||||||
<para>A wrapper around <command>ranlib</command> that adds a
|
<para>A wrapper around <command>ranlib</command> that adds a
|
||||||
plugin to the command line. This program is only used
|
plugin to the command line. This program is only used
|
||||||
to add "link time optimization" and is not useful with the
|
to add "link time optimization" and is not useful with the
|
||||||
default build options</para>
|
default build options.</para>
|
||||||
<indexterm zone="ch-system-gcc gcc-ranlib">
|
<indexterm zone="ch-system-gcc gcc-ranlib">
|
||||||
<primary sortas="b-gcc-ranlib">gc-ranlib</primary>
|
<primary sortas="b-gcc-ranlib">gc-ranlib</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
@ -444,7 +444,7 @@ mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
|
|||||||
<term><command>gcov</command></term>
|
<term><command>gcov</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>A coverage testing tool; it is used to analyze programs to
|
<para>A coverage testing tool; it is used to analyze programs to
|
||||||
determine where optimizations will have the most effect</para>
|
determine where optimizations will have the greatest effect</para>
|
||||||
<indexterm zone="ch-system-gcc gcov">
|
<indexterm zone="ch-system-gcc gcov">
|
||||||
<primary sortas="b-gcov">gcov</primary>
|
<primary sortas="b-gcov">gcov</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
@ -567,7 +567,7 @@ mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
|
|||||||
<varlistentry id="liblto_plugin">
|
<varlistentry id="liblto_plugin">
|
||||||
<term><filename class="libraryfile">liblto_plugin</filename></term>
|
<term><filename class="libraryfile">liblto_plugin</filename></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>GCC's LTO plugin allows binutils to process object files
|
<para>GCC's LTO plugin allows Binutils to process object files
|
||||||
produced by GCC with LTO enabled</para>
|
produced by GCC with LTO enabled</para>
|
||||||
<indexterm zone="ch-system-gcc liblto_plugin">
|
<indexterm zone="ch-system-gcc liblto_plugin">
|
||||||
<primary sortas="c-liblto_plugin">liblto_plugin</primary>
|
<primary sortas="c-liblto_plugin">liblto_plugin</primary>
|
||||||
@ -589,8 +589,8 @@ mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
|
|||||||
<term><filename class="libraryfile">libssp</filename></term>
|
<term><filename class="libraryfile">libssp</filename></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Contains routines supporting GCC's stack-smashing protection
|
<para>Contains routines supporting GCC's stack-smashing protection
|
||||||
functionality. Normally it's unused because glibc also provides
|
functionality. Normally it is not used, because Glibc also provides
|
||||||
those routines</para>
|
those routines.</para>
|
||||||
<indexterm zone="ch-system-gcc libssp">
|
<indexterm zone="ch-system-gcc libssp">
|
||||||
<primary sortas="c-libssp">libssp</primary>
|
<primary sortas="c-libssp">libssp</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
|
Loading…
Reference in New Issue
Block a user