[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[673b0d8] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[6a82dd9] | 7 |
|
---|
[81fd230] | 8 | <sect1 id="ch-system-gcc" role="wrap">
|
---|
[6a82dd9] | 9 | <?dbhtml filename="gcc.html"?>
|
---|
| 10 |
|
---|
[e747759] | 11 | <sect1info condition="script">
|
---|
| 12 | <productname>gcc</productname>
|
---|
| 13 | <productnumber>&gcc-version;</productnumber>
|
---|
| 14 | <address>&gcc-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
[6a82dd9] | 17 | <title>GCC-&gcc-version;</title>
|
---|
| 18 |
|
---|
| 19 | <indexterm zone="ch-system-gcc">
|
---|
| 20 | <primary sortas="a-GCC">GCC</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="package">
|
---|
| 24 | <title/>
|
---|
[6370fa6] | 25 |
|
---|
[6a82dd9] | 26 | <para>The GCC package contains the GNU compiler collection, which includes
|
---|
| 27 | the C and C++ compilers.</para>
|
---|
[673b0d8] | 28 |
|
---|
[6a82dd9] | 29 | <segmentedlist>
|
---|
| 30 | <segtitle>&buildtime;</segtitle>
|
---|
| 31 | <segtitle>&diskspace;</segtitle>
|
---|
[5888299] | 32 |
|
---|
[6a82dd9] | 33 | <seglistitem>
|
---|
[e4a5635] | 34 | <seg>&gcc-ch6-sbu;</seg>
|
---|
| 35 | <seg>&gcc-ch6-du;</seg>
|
---|
[6a82dd9] | 36 | </seglistitem>
|
---|
| 37 | </segmentedlist>
|
---|
[3554fa3a] | 38 |
|
---|
[6a82dd9] | 39 | </sect2>
|
---|
| 40 |
|
---|
| 41 | <sect2 role="installation">
|
---|
| 42 | <title>Installation of GCC</title>
|
---|
[12836f5] | 43 |
|
---|
[b3f1ebb3] | 44 | <para arch="default">If building on x86_64, change the default directory
|
---|
| 45 | name for 64-bit libraries to <quote>lib</quote>:</para>
|
---|
[be3d9f3] | 46 |
|
---|
[b3f1ebb3] | 47 | <screen arch="default"><userinput remap="pre">case $(uname -m) in
|
---|
[be3d9f3] | 48 | x86_64)
|
---|
| 49 | sed -e '/m64=/s/lib64/lib/' \
|
---|
| 50 | -i.orig gcc/config/i386/t-linux64
|
---|
| 51 | ;;
|
---|
| 52 | esac</userinput></screen>
|
---|
| 53 |
|
---|
[fd48baa] | 54 | <para arch="ml_32,ml_x32,ml_all">Change the default directory name for 64-bit
|
---|
[b3f1ebb3] | 55 | libraries to <quote>lib</quote>:</para>
|
---|
| 56 |
|
---|
[9c0c3a0] | 57 | <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \
|
---|
| 58 | -e '/m32=/s/m32=.*/m32=..\/lib32$(call if_multiarch,:i386-linux-gnu)/' \
|
---|
| 59 | -i.orig gcc/config/i386/t-linux64</userinput></screen>
|
---|
[b3f1ebb3] | 60 |
|
---|
[0967c90] | 61 | <para>Remove the symlink created earlier as the final gcc includes will be
|
---|
| 62 | installed here:</para>
|
---|
| 63 |
|
---|
| 64 | <screen><userinput remap="pre">rm -f /usr/lib/gcc</userinput></screen>
|
---|
| 65 |
|
---|
[b3f1ebb3] | 66 | <!-- Following patch might be obsolete with gcc >= 8.2.1 -->
|
---|
| 67 | <para>Fix an issue with isl-&isl-version;:</para>
|
---|
| 68 |
|
---|
| 69 | <screen><userinput remap="pre">sed -e "/#include <isl\/schedule_node.h>/ a#include <isl/id.h>\n#include <isl/space.h>" \
|
---|
| 70 | -i gcc/graphite.h</userinput></screen>
|
---|
| 71 |
|
---|
[725ef3b] | 72 | <para>
|
---|
| 73 | As in gcc-pass2, fix a problem introduced by Glibc-2.31:
|
---|
| 74 | </para>
|
---|
| 75 |
|
---|
| 76 | <screen><userinput remap="pre">sed -e '1161 s|^|//|' \
|
---|
| 77 | -i libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc</userinput></screen>
|
---|
| 78 |
|
---|
[f1dd547] | 79 | <para>The GCC documentation recommends building GCC in a dedicated build directory:</para>
|
---|
[73aedd1d] | 80 |
|
---|
[f1dd547] | 81 | <screen><userinput remap="pre">mkdir -v build
|
---|
| 82 | cd build</userinput></screen>
|
---|
[73aedd1d] | 83 |
|
---|
[6a82dd9] | 84 | <para>Prepare GCC for compilation:</para>
|
---|
[73aedd1d] | 85 |
|
---|
[f5ae110a] | 86 | <screen><userinput arch="default" remap="configure">mloptions="--disable-multilib"</userinput>
|
---|
| 87 | <userinput arch="ml_32,ml_x32,ml_all" remap="configure">mloptions="--enable-multilib --with-multilib-list=m64"</userinput>
|
---|
| 88 | <userinput arch="ml_32,ml_all" remap="configure">mloptions="$mloptions,m32"</userinput>
|
---|
| 89 | <userinput arch="ml_x32,ml_all" remap="configure">mloptions="$mloptions,mx32"</userinput>
|
---|
| 90 | <userinput remap="configure">SED=sed \
|
---|
[f1dd547] | 91 | ../configure --prefix=/usr \
|
---|
| 92 | --enable-languages=c,c++ \
|
---|
| 93 | --disable-bootstrap \
|
---|
[f5ae110a] | 94 | --with-system-zlib \
|
---|
| 95 | $mloptions</userinput></screen>
|
---|
[b3f1ebb3] | 96 |
|
---|
[1cdaff9] | 97 | <para>Note that for other languages, there are some prerequisites that
|
---|
[93756f6] | 98 | are not yet available. See the
|
---|
[0ee07e5] | 99 | <ulink url="&blfs-book;general/gcc.html">BLFS Book</ulink>
|
---|
[93756f6] | 100 | for instructions on how to build all of GCC's supported languages.</para>
|
---|
[182d5d3] | 101 |
|
---|
[ae4d45a] | 102 | <variablelist>
|
---|
[0cba512d] | 103 | <title>The meaning of the new configure parameters:</title>
|
---|
[cde2ae7] | 104 |
|
---|
[ff0f063] | 105 | <varlistentry>
|
---|
[cde2ae7] | 106 | <term><envar>SED=sed</envar></term>
|
---|
[ff0f063] | 107 | <listitem>
|
---|
[cde2ae7] | 108 | <para>Setting this environment variable prevents a hard-coded
|
---|
| 109 | path to /tools/bin/sed.</para>
|
---|
[ff0f063] | 110 | </listitem>
|
---|
| 111 | </varlistentry>
|
---|
[cad96bf] | 112 | <!--
|
---|
[d4407c7] | 113 | <varlistentry>
|
---|
[cad96bf] | 114 | <term><parameter>- -disable-libmpx</parameter></term>
|
---|
[d4407c7] | 115 | <listitem>
|
---|
| 116 | <para>This switch tells GCC to not build mpx (Memory Protection
|
---|
| 117 | Extensions) that can cause problems on some processors. It has
|
---|
| 118 | been removed from the next version of gcc.</para>
|
---|
| 119 | </listitem>
|
---|
| 120 | </varlistentry>
|
---|
[cad96bf] | 121 | -->
|
---|
[ae4d45a] | 122 | <varlistentry>
|
---|
| 123 | <term><parameter>--with-system-zlib</parameter></term>
|
---|
| 124 | <listitem>
|
---|
| 125 | <para>This switch tells GCC to link to the system installed copy of
|
---|
[8dac2e2] | 126 | the Zlib library, rather than its own internal copy.</para>
|
---|
[ae4d45a] | 127 | </listitem>
|
---|
| 128 | </varlistentry>
|
---|
| 129 | </variablelist>
|
---|
| 130 |
|
---|
[6a82dd9] | 131 | <para>Compile the package:</para>
|
---|
[73aedd1d] | 132 |
|
---|
[0445a3d] | 133 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[73aedd1d] | 134 |
|
---|
[6a82dd9] | 135 | <important>
|
---|
| 136 | <para>In this section, the test suite for GCC is considered
|
---|
| 137 | critical. Do not skip it under any circumstance.</para>
|
---|
| 138 | </important>
|
---|
[81fd230] | 139 |
|
---|
[4e48f56e] | 140 | <para>One set of tests in the GCC test suite is known to exhaust the stack,
|
---|
| 141 | so increase the stack size prior to running the tests:</para>
|
---|
| 142 |
|
---|
[2efa44a] | 143 | <screen><userinput remap="test">ulimit -s 32768</userinput></screen>
|
---|
[4e48f56e] | 144 |
|
---|
[76db8d6] | 145 | <para>Test the results as a non-privileged user, but do not stop at errors:</para>
|
---|
| 146 |
|
---|
| 147 | <screen><userinput remap="test">chown -Rv nobody .
|
---|
| 148 | su nobody -s /bin/bash -c "PATH=$PATH make -k check"</userinput></screen>
|
---|
[73aedd1d] | 149 |
|
---|
[9278974d] | 150 | <para>To receive a summary of the test suite results, run:</para>
|
---|
| 151 |
|
---|
[f1dd547] | 152 | <screen><userinput remap="test">../contrib/test_summary</userinput></screen>
|
---|
[9278974d] | 153 |
|
---|
| 154 | <para>For only the summaries, pipe the output through
|
---|
| 155 | <userinput>grep -A7 Summ</userinput>.</para>
|
---|
| 156 |
|
---|
| 157 | <para>Results can be compared with those located at <ulink
|
---|
[98e7ac4] | 158 | url="&test-results;"/> and
|
---|
[b30de8f] | 159 | <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para>
|
---|
[9278974d] | 160 |
|
---|
[7433c5d] | 161 | <para>Six tests related to get_time are known to fail. These are
|
---|
[1daca67] | 162 | apparently related to the en_HK locale.</para>
|
---|
[7433c5d] | 163 |
|
---|
[cad96bf] | 164 | <para>Two tests named lookup.cc and reverse.cc in experimental/net
|
---|
| 165 | are known to fail in LFS chroot environment because they require
|
---|
| 166 | /etc/hosts and iana-etc.</para>
|
---|
| 167 |
|
---|
| 168 | <para>Two tests named pr57193.c and pr90178.c are known to fail.</para>
|
---|
| 169 |
|
---|
[9278974d] | 170 | <para>A few unexpected failures cannot always be avoided. The GCC developers
|
---|
[0238d49] | 171 | are usually aware of these issues, but have not resolved them yet.
|
---|
[9278974d] | 172 | Unless the test results are vastly different from those at the above URL,
|
---|
| 173 | it is safe to continue.</para>
|
---|
[73aedd1d] | 174 |
|
---|
[1803e9b] | 175 | <!--note><para>
|
---|
[e3e989a] | 176 | On some combinations of kernel configuration and AMD processors
|
---|
| 177 | there may be more than 1100 failures in the gcc.target/i386/mpx
|
---|
| 178 | tests (which are designed to test the MPX option on recent
|
---|
| 179 | Intel processors). These can safely be ignored on AMD
|
---|
[1c8cc71] | 180 | processors. These tests will also fail on Intel processors if MPX support
|
---|
| 181 | is not enabled in the kernel even though it is present on the CPU.
|
---|
[1803e9b] | 182 | </para></note-->
|
---|
[e3e989a] | 183 |
|
---|
[bc375da6] | 184 | <para>Install the package and remove an unneeded directory:</para>
|
---|
[73aedd1d] | 185 |
|
---|
[bc375da6] | 186 | <screen><userinput remap="install">make install
|
---|
[1daca67] | 187 | rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include-fixed/bits/</userinput></screen>
|
---|
| 188 |
|
---|
| 189 | <para>The GCC build directory is owned by <systemitem class="username">
|
---|
| 190 | nobody</systemitem> now and the ownership of the installed header
|
---|
| 191 | directory (and its content) will be incorrect. Change the ownership to
|
---|
| 192 | <systemitem class="username">root</systemitem> user and group:</para>
|
---|
| 193 |
|
---|
| 194 | <screen><userinput remap="install">chown -v -R root:root \
|
---|
| 195 | /usr/lib/gcc/*linux-gnu/&gcc-version;/include{,-fixed}</userinput></screen>
|
---|
[73aedd1d] | 196 |
|
---|
[60b23a6f] | 197 | <para>Create a symlink required by the <ulink
|
---|
[b30de8f] | 198 | url="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s09.html">FHS</ulink>
|
---|
[60b23a6f] | 199 | for "historical" reasons.</para>
|
---|
[73aedd1d] | 200 |
|
---|
[0445a3d] | 201 | <screen><userinput remap="install">ln -sv ../usr/bin/cpp /lib</userinput></screen>
|
---|
[73aedd1d] | 202 |
|
---|
[6a82dd9] | 203 | <para>Many packages use the name <command>cc</command> to call the C
|
---|
| 204 | compiler. To satisfy those packages, create a symlink:</para>
|
---|
[1ba726f] | 205 |
|
---|
[0445a3d] | 206 | <screen><userinput remap="install">ln -sv gcc /usr/bin/cc</userinput></screen>
|
---|
[1ba726f] | 207 |
|
---|
[6206f72] | 208 | <para>Add a compatibility symlink to enable building programs with
|
---|
| 209 | Link Time Optimization (LTO):</para>
|
---|
| 210 |
|
---|
[aa9bb6c] | 211 | <screen><userinput remap="install">install -v -dm755 /usr/lib/bfd-plugins
|
---|
[040ecb6] | 212 | ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \
|
---|
| 213 | /usr/lib/bfd-plugins/</userinput></screen>
|
---|
[6206f72] | 214 |
|
---|
[09f1daf] | 215 | <para>Now that our final toolchain is in place, it is important to again ensure
|
---|
| 216 | that compiling and linking will work as expected. We do this by performing
|
---|
| 217 | the same sanity checks as we did earlier in the chapter:</para>
|
---|
| 218 |
|
---|
[d9441360] | 219 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 220 | href="adjusting.xml"
|
---|
[09f1daf] | 221 | xpointer="xpointer(//*[@os='a'])"/>
|
---|
| 222 |
|
---|
[d9441360] | 223 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 224 | href="adjusting.xml"
|
---|
[09f1daf] | 225 | xpointer="xpointer(//*[@os='b'])"/>
|
---|
| 226 |
|
---|
[d9441360] | 227 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 228 | href="adjusting.xml"
|
---|
[09f1daf] | 229 | xpointer="xpointer(//*[@os='c'])"/>
|
---|
| 230 |
|
---|
[d9441360] | 231 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 232 | href="adjusting.xml"
|
---|
[09f1daf] | 233 | xpointer="xpointer(//*[@os='d'])"/>
|
---|
| 234 |
|
---|
[d9441360] | 235 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 236 | href="adjusting.xml"
|
---|
[09f1daf] | 237 | xpointer="xpointer(//*[@os='e'])"/>
|
---|
| 238 |
|
---|
[d9441360] | 239 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 240 | href="adjusting.xml"
|
---|
[09f1daf] | 241 | xpointer="xpointer(//*[@os='f'])"/>
|
---|
| 242 |
|
---|
[98e7ac4] | 243 | <screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded
|
---|
| 244 | /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
|
---|
| 245 | /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
|
---|
[09f1daf] | 246 |
|
---|
[6e88633] | 247 | <para>Depending on your machine architecture, the above may differ slightly,
|
---|
| 248 | the difference usually being the name of the directory
|
---|
[be3d9f3] | 249 | after <filename class="directory">/usr/lib/gcc</filename>. The important
|
---|
| 250 | thing to look for here is that <command>gcc</command> has found all three
|
---|
[5f7456b] | 251 | <filename>crt*.o</filename> files under the
|
---|
| 252 | <filename class="directory">/usr/lib</filename> directory.</para>
|
---|
[6e88633] | 253 |
|
---|
[d9441360] | 254 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 255 | href="adjusting.xml"
|
---|
[09f1daf] | 256 | xpointer="xpointer(//*[@os='g'])"/>
|
---|
| 257 |
|
---|
[041c8f67] | 258 | <screen><userinput>grep -B4 '^ /usr/include' dummy.log</userinput></screen>
|
---|
[e9a652b] | 259 |
|
---|
[d9441360] | 260 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 261 | href="adjusting.xml"
|
---|
[09f1daf] | 262 | xpointer="xpointer(//*[@os='h'])"/>
|
---|
| 263 |
|
---|
[e9a652b] | 264 | <screen><computeroutput>#include <...> search starts here:
|
---|
[98e7ac4] | 265 | /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
|
---|
[c528e3a] | 266 | /usr/local/include
|
---|
[98e7ac4] | 267 | /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
|
---|
[e9a652b] | 268 | /usr/include</computeroutput></screen>
|
---|
| 269 |
|
---|
[6e88633] | 270 | <para>Again, note that the directory named after your target triplet may be
|
---|
| 271 | different than the above, depending on your architecture.</para>
|
---|
| 272 |
|
---|
[0d84af1] | 273 | <!-- This appears to be obsolete
|
---|
| 274 |
|
---|
[3f39abf3] | 275 | <note><para>As of version 4.3.0, GCC now unconditionally installs the
|
---|
| 276 | <filename>limits.h</filename> file into the private
|
---|
[041c8f67] | 277 | <filename class="directory">include-fixed</filename> directory, and that
|
---|
[3f39abf3] | 278 | directory is required to be in place.</para></note>
|
---|
[0d84af1] | 279 | -->
|
---|
[3f39abf3] | 280 |
|
---|
[d9441360] | 281 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 282 | href="adjusting.xml"
|
---|
[09f1daf] | 283 | xpointer="xpointer(//*[@os='i'])"/>
|
---|
| 284 |
|
---|
[d9441360] | 285 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 286 | href="adjusting.xml"
|
---|
[09f1daf] | 287 | xpointer="xpointer(//*[@os='j'])"/>
|
---|
| 288 |
|
---|
[d9441360] | 289 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 290 | href="adjusting.xml"
|
---|
[09f1daf] | 291 | xpointer="xpointer(//*[@os='k'])"/>
|
---|
| 292 |
|
---|
[98e7ac4] | 293 | <screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
|
---|
| 294 | SEARCH_DIR("/usr/local/lib64")
|
---|
| 295 | SEARCH_DIR("/lib64")
|
---|
| 296 | SEARCH_DIR("/usr/lib64")
|
---|
| 297 | SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
|
---|
[e9a652b] | 298 | SEARCH_DIR("/usr/local/lib")
|
---|
| 299 | SEARCH_DIR("/lib")
|
---|
[6e88633] | 300 | SEARCH_DIR("/usr/lib");</computeroutput></screen>
|
---|
| 301 |
|
---|
[b3f1ebb3] | 302 | <para arch="default">A 32-bit system may see a few different directories.
|
---|
| 303 | For example, here is the output from an i686 machine:</para>
|
---|
[6e88633] | 304 |
|
---|
[b3f1ebb3] | 305 | <screen arch="default"><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")
|
---|
[98e7ac4] | 306 | SEARCH_DIR("/usr/local/lib32")
|
---|
| 307 | SEARCH_DIR("/lib32")
|
---|
| 308 | SEARCH_DIR("/usr/lib32")
|
---|
| 309 | SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
|
---|
[6e88633] | 310 | SEARCH_DIR("/usr/local/lib")
|
---|
| 311 | SEARCH_DIR("/lib")
|
---|
[e9a652b] | 312 | SEARCH_DIR("/usr/lib");</computeroutput></screen>
|
---|
| 313 |
|
---|
[d9441360] | 314 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 315 | href="adjusting.xml"
|
---|
[09f1daf] | 316 | xpointer="xpointer(//*[@os='l'])"/>
|
---|
| 317 |
|
---|
[d9441360] | 318 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 319 | href="adjusting.xml"
|
---|
[09f1daf] | 320 | xpointer="xpointer(//*[@os='m'])"/>
|
---|
| 321 |
|
---|
[d9441360] | 322 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 323 | href="adjusting.xml"
|
---|
[09f1daf] | 324 | xpointer="xpointer(//*[@os='n'])"/>
|
---|
| 325 |
|
---|
[d9441360] | 326 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 327 | href="adjusting.xml"
|
---|
[09f1daf] | 328 | xpointer="xpointer(//*[@os='o'])"/>
|
---|
| 329 |
|
---|
[d9441360] | 330 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 331 | href="adjusting.xml"
|
---|
[09f1daf] | 332 | xpointer="xpointer(//*[@os='p'])"/>
|
---|
| 333 |
|
---|
[d9441360] | 334 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 335 | href="adjusting.xml"
|
---|
[09f1daf] | 336 | xpointer="xpointer(//*[@os='q'])"/>
|
---|
| 337 |
|
---|
[d9441360] | 338 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 339 | href="adjusting.xml"
|
---|
[09f1daf] | 340 | xpointer="xpointer(//*[@os='r'])"/>
|
---|
| 341 |
|
---|
[d9441360] | 342 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 343 | href="adjusting.xml"
|
---|
[09f1daf] | 344 | xpointer="xpointer(//*[@os='s'])"/>
|
---|
| 345 |
|
---|
[d9441360] | 346 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 347 | href="adjusting.xml"
|
---|
[09f1daf] | 348 | xpointer="xpointer(//*[@os='t'])"/>
|
---|
[6a82dd9] | 349 |
|
---|
[d9441360] | 350 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 351 | href="adjusting.xml"
|
---|
[e9a652b] | 352 | xpointer="xpointer(//*[@os='u'])"/>
|
---|
| 353 |
|
---|
[d9441360] | 354 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1a3e6a3] | 355 | href="adjusting.xml"
|
---|
[e9a652b] | 356 | xpointer="xpointer(//*[@os='v'])"/>
|
---|
| 357 |
|
---|
[970a126] | 358 | <para>Finally, move a misplaced file:</para>
|
---|
[39ec01c] | 359 |
|
---|
[970a126] | 360 | <screen><userinput remap="install">mkdir -pv /usr/share/gdb/auto-load/usr/lib
|
---|
[b3f1ebb3] | 361 | mv -v /usr/lib/libstdc++*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
|
---|
[39ec01c] | 362 |
|
---|
[6a82dd9] | 363 | </sect2>
|
---|
| 364 |
|
---|
| 365 | <sect2 id="contents-gcc" role="content">
|
---|
| 366 | <title>Contents of GCC</title>
|
---|
| 367 |
|
---|
| 368 | <segmentedlist>
|
---|
| 369 | <segtitle>Installed programs</segtitle>
|
---|
| 370 | <segtitle>Installed libraries</segtitle>
|
---|
[fe05b08] | 371 | <segtitle>Installed directories</segtitle>
|
---|
[6a82dd9] | 372 |
|
---|
| 373 | <seglistitem>
|
---|
[2ca8941] | 374 | <seg>c++, cc (link to gcc), cpp, g++, gcc,
|
---|
[78cc3be] | 375 | gcc-ar, gcc-nm, gcc-ranlib, gcov, gcov-dump, and gcov-tool</seg>
|
---|
[e0901b3] | 376 |
|
---|
[78cc3be] | 377 | <seg>libasan.{a,so}, libatomic.{a,so}, libcc1.so, libgcc.a, libgcc_eh.a,
|
---|
| 378 | libgcc_s.so, libgcov.a, libgomp.{a,so}, libitm.{a,so},
|
---|
| 379 | liblsan.{a,so}, liblto_plugin.so,
|
---|
| 380 | libquadmath.{a,so}, libssp.{a,so}, libssp_nonshared.a,
|
---|
| 381 | libstdc++.{a,so}, libstdc++fs.a, libsupc++.a, libtsan.{a,so},
|
---|
| 382 | and libubsan.{a,so}</seg>
|
---|
[2ca8941] | 383 |
|
---|
[7bb9fda] | 384 | <seg>/usr/include/c++, /usr/lib/gcc, /usr/libexec/gcc, and
|
---|
[4e8a532] | 385 | /usr/share/gcc-&gcc-version;</seg>
|
---|
[6a82dd9] | 386 | </seglistitem>
|
---|
| 387 | </segmentedlist>
|
---|
| 388 |
|
---|
| 389 | <variablelist>
|
---|
| 390 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 391 | <?dbfo list-presentation="list"?>
|
---|
| 392 | <?dbhtml list-presentation="table"?>
|
---|
| 393 |
|
---|
[75128571] | 394 | <varlistentry id="c">
|
---|
| 395 | <term><command>c++</command></term>
|
---|
| 396 | <listitem>
|
---|
| 397 | <para>The C++ compiler</para>
|
---|
| 398 | <indexterm zone="ch-system-gcc c">
|
---|
| 399 | <primary sortas="b-c++">c++</primary>
|
---|
| 400 | </indexterm>
|
---|
| 401 | </listitem>
|
---|
| 402 | </varlistentry>
|
---|
| 403 |
|
---|
[6a82dd9] | 404 | <varlistentry id="cc">
|
---|
| 405 | <term><command>cc</command></term>
|
---|
| 406 | <listitem>
|
---|
| 407 | <para>The C compiler</para>
|
---|
| 408 | <indexterm zone="ch-system-gcc cc">
|
---|
| 409 | <primary sortas="b-cc">cc</primary>
|
---|
| 410 | </indexterm>
|
---|
| 411 | </listitem>
|
---|
| 412 | </varlistentry>
|
---|
| 413 |
|
---|
| 414 | <varlistentry id="cpp">
|
---|
| 415 | <term><command>cpp</command></term>
|
---|
| 416 | <listitem>
|
---|
| 417 | <para>The C preprocessor; it is used by the compiler to expand the
|
---|
| 418 | #include, #define, and similar statements in the source files</para>
|
---|
| 419 | <indexterm zone="ch-system-gcc cpp">
|
---|
| 420 | <primary sortas="b-cpp">cpp</primary>
|
---|
| 421 | </indexterm>
|
---|
| 422 | </listitem>
|
---|
| 423 | </varlistentry>
|
---|
| 424 |
|
---|
| 425 | <varlistentry id="g">
|
---|
| 426 | <term><command>g++</command></term>
|
---|
| 427 | <listitem>
|
---|
| 428 | <para>The C++ compiler</para>
|
---|
| 429 | <indexterm zone="ch-system-gcc g">
|
---|
| 430 | <primary sortas="b-g++">g++</primary>
|
---|
| 431 | </indexterm>
|
---|
| 432 | </listitem>
|
---|
| 433 | </varlistentry>
|
---|
| 434 |
|
---|
| 435 | <varlistentry id="gcc">
|
---|
| 436 | <term><command>gcc</command></term>
|
---|
| 437 | <listitem>
|
---|
| 438 | <para>The C compiler</para>
|
---|
| 439 | <indexterm zone="ch-system-gcc gcc">
|
---|
| 440 | <primary sortas="b-gcc">gcc</primary>
|
---|
| 441 | </indexterm>
|
---|
| 442 | </listitem>
|
---|
| 443 | </varlistentry>
|
---|
| 444 |
|
---|
[e0901b3] | 445 | <varlistentry id="gcc-ar">
|
---|
| 446 | <term><command>gcc-ar</command></term>
|
---|
| 447 | <listitem>
|
---|
| 448 | <para>A wrapper around <command>ar</command> that adds a
|
---|
[afba93b] | 449 | plugin to the command line. This program is only used
|
---|
[edbeeb5] | 450 | to add "link time optimization" and is not useful with the
|
---|
[afba93b] | 451 | default build options</para>
|
---|
[e0901b3] | 452 | <indexterm zone="ch-system-gcc gcc-ar">
|
---|
| 453 | <primary sortas="b-gcc-ar">gc-ar</primary>
|
---|
| 454 | </indexterm>
|
---|
| 455 | </listitem>
|
---|
| 456 | </varlistentry>
|
---|
| 457 |
|
---|
| 458 | <varlistentry id="gcc-nm">
|
---|
| 459 | <term><command>gcc-nm</command></term>
|
---|
| 460 | <listitem>
|
---|
| 461 | <para>A wrapper around <command>nm</command> that adds a
|
---|
[afba93b] | 462 | plugin to the command line. This program is only used
|
---|
[a885478] | 463 | to add "link time optimization" and is not useful with the
|
---|
[afba93b] | 464 | default build options</para>
|
---|
[e0901b3] | 465 | <indexterm zone="ch-system-gcc gcc-nm">
|
---|
| 466 | <primary sortas="b-gcc-nm">gc-nm</primary>
|
---|
| 467 | </indexterm>
|
---|
| 468 | </listitem>
|
---|
| 469 | </varlistentry>
|
---|
| 470 |
|
---|
| 471 | <varlistentry id="gcc-ranlib">
|
---|
| 472 | <term><command>gcc-ranlib</command></term>
|
---|
| 473 | <listitem>
|
---|
| 474 | <para>A wrapper around <command>ranlib</command> that adds a
|
---|
[afba93b] | 475 | plugin to the command line. This program is only used
|
---|
[a885478] | 476 | to add "link time optimization" and is not useful with the
|
---|
[afba93b] | 477 | default build options</para>
|
---|
[e0901b3] | 478 | <indexterm zone="ch-system-gcc gcc-ranlib">
|
---|
| 479 | <primary sortas="b-gcc-ranlib">gc-ranlib</primary>
|
---|
| 480 | </indexterm>
|
---|
| 481 | </listitem>
|
---|
| 482 | </varlistentry>
|
---|
[6a82dd9] | 483 |
|
---|
| 484 | <varlistentry id="gcov">
|
---|
| 485 | <term><command>gcov</command></term>
|
---|
| 486 | <listitem>
|
---|
| 487 | <para>A coverage testing tool; it is used to analyze programs to
|
---|
| 488 | determine where optimizations will have the most effect</para>
|
---|
| 489 | <indexterm zone="ch-system-gcc gcov">
|
---|
| 490 | <primary sortas="b-gcov">gcov</primary>
|
---|
| 491 | </indexterm>
|
---|
[4783efe] | 492 | </listitem>
|
---|
| 493 | </varlistentry>
|
---|
| 494 |
|
---|
[78cc3be] | 495 | <varlistentry id="gcov-dump">
|
---|
| 496 | <term><command>gcov-dump</command></term>
|
---|
| 497 | <listitem>
|
---|
| 498 | <para>Offline gcda and gcno profile dump tool</para>
|
---|
| 499 | <indexterm zone="ch-system-gcc gcov-dump">
|
---|
| 500 | <primary sortas="b-gcov-dump">gcov-dump</primary>
|
---|
| 501 | </indexterm>
|
---|
| 502 | </listitem>
|
---|
| 503 | </varlistentry>
|
---|
| 504 |
|
---|
| 505 | <varlistentry id="gcov-tool">
|
---|
| 506 | <term><command>gcov-tool</command></term>
|
---|
| 507 | <listitem>
|
---|
| 508 | <para>Offline gcda profile processing tool</para>
|
---|
| 509 | <indexterm zone="ch-system-gcc gcov-tool">
|
---|
| 510 | <primary sortas="b-gcov-tool">gcov-tool</primary>
|
---|
| 511 | </indexterm>
|
---|
| 512 | </listitem>
|
---|
| 513 | </varlistentry>
|
---|
| 514 |
|
---|
[4783efe] | 515 | <varlistentry id="libasan">
|
---|
[78cc3be] | 516 | <term><filename class="libraryfile">libasan</filename></term>
|
---|
[4783efe] | 517 | <listitem>
|
---|
| 518 | <para>The Address Sanitizer runtime library</para>
|
---|
| 519 | <indexterm zone="ch-system-gcc libasan">
|
---|
| 520 | <primary sortas="b-libasan">libasan</primary>
|
---|
| 521 | </indexterm>
|
---|
[6a82dd9] | 522 | </listitem>
|
---|
| 523 | </varlistentry>
|
---|
| 524 |
|
---|
[78cc3be] | 525 | <varlistentry id="libatomic">
|
---|
| 526 | <term><filename class="libraryfile">libatomic</filename></term>
|
---|
| 527 | <listitem>
|
---|
| 528 | <para>GCC atomic built-in runtime library</para>
|
---|
| 529 | <indexterm zone="ch-system-gcc libatomic">
|
---|
| 530 | <primary sortas="b-libatomic">libatomic</primary>
|
---|
| 531 | </indexterm>
|
---|
| 532 | </listitem>
|
---|
| 533 | </varlistentry>
|
---|
| 534 |
|
---|
| 535 | <varlistentry id="libcc1">
|
---|
| 536 | <term><filename class="libraryfile">libcc1</filename></term>
|
---|
| 537 | <listitem>
|
---|
| 538 | <para>The C preprocessing library</para>
|
---|
| 539 | <indexterm zone="ch-system-gcc libcc1">
|
---|
| 540 | <primary sortas="b-libcc1">libcc1</primary>
|
---|
| 541 | </indexterm>
|
---|
| 542 | </listitem>
|
---|
| 543 | </varlistentry>
|
---|
| 544 |
|
---|
[6a82dd9] | 545 | <varlistentry id="libgcc">
|
---|
| 546 | <term><filename class="libraryfile">libgcc</filename></term>
|
---|
| 547 | <listitem>
|
---|
| 548 | <para>Contains run-time support for <command>gcc</command></para>
|
---|
| 549 | <indexterm zone="ch-system-gcc libgcc">
|
---|
[afba93b] | 550 | <primary sortas="c-libgcc">libgcc</primary>
|
---|
[6a82dd9] | 551 | </indexterm>
|
---|
| 552 | </listitem>
|
---|
| 553 | </varlistentry>
|
---|
| 554 |
|
---|
[90aae6b] | 555 | <varlistentry id="libgcov">
|
---|
| 556 | <term><filename class="libraryfile">libgcov</filename></term>
|
---|
| 557 | <listitem>
|
---|
| 558 | <para>This library is linked in to a program when GCC is instructed
|
---|
| 559 | to enable profiling</para>
|
---|
| 560 | <indexterm zone="ch-system-gcc libgcov">
|
---|
| 561 | <primary sortas="c-libgcov">libgcov</primary>
|
---|
| 562 | </indexterm>
|
---|
| 563 | </listitem>
|
---|
| 564 | </varlistentry>
|
---|
| 565 |
|
---|
| 566 | <varlistentry id="libgomp">
|
---|
| 567 | <term><filename class="libraryfile">libgomp</filename></term>
|
---|
| 568 | <listitem>
|
---|
| 569 | <para>GNU implementation of the OpenMP API for multi-platform
|
---|
| 570 | shared-memory parallel programming in C/C++ and Fortran</para>
|
---|
| 571 | <indexterm zone="ch-system-gcc libgomp">
|
---|
| 572 | <primary sortas="c-libgomp">libgomp</primary>
|
---|
| 573 | </indexterm>
|
---|
| 574 | </listitem>
|
---|
| 575 | </varlistentry>
|
---|
| 576 |
|
---|
[78cc3be] | 577 | <varlistentry id="liblsan">
|
---|
| 578 | <term><filename class="libraryfile">liblsan</filename></term>
|
---|
[b755562] | 579 | <listitem>
|
---|
[78cc3be] | 580 | <para>The Leak Sanitizer runtime library</para>
|
---|
| 581 | <indexterm zone="ch-system-gcc liblsan">
|
---|
| 582 | <primary sortas="c-liblsan">liblsan</primary>
|
---|
[b755562] | 583 | </indexterm>
|
---|
| 584 | </listitem>
|
---|
| 585 | </varlistentry>
|
---|
| 586 |
|
---|
[3119ddc] | 587 | <varlistentry id="liblto_plugin">
|
---|
| 588 | <term><filename class="libraryfile">liblto_plugin</filename></term>
|
---|
| 589 | <listitem>
|
---|
| 590 | <para>GCC's Link Time Optimization (LTO) plugin allows GCC to perform
|
---|
[afba93b] | 591 | optimizations across compilation units</para>
|
---|
[3119ddc] | 592 | <indexterm zone="ch-system-gcc liblto_plugin">
|
---|
[afba93b] | 593 | <primary sortas="c-liblto_plugin">liblto_plugin</primary>
|
---|
[3119ddc] | 594 | </indexterm>
|
---|
| 595 | </listitem>
|
---|
| 596 | </varlistentry>
|
---|
[7bb9fda] | 597 |
|
---|
[3119ddc] | 598 | <varlistentry id="libquadmath">
|
---|
| 599 | <term><filename class="libraryfile">libquadmath</filename></term>
|
---|
| 600 | <listitem>
|
---|
| 601 | <para>GCC Quad Precision Math Library API</para>
|
---|
| 602 | <indexterm zone="ch-system-gcc libquadmath">
|
---|
[afba93b] | 603 | <primary sortas="c-libquadmath">libquadmath</primary>
|
---|
[3119ddc] | 604 | </indexterm>
|
---|
| 605 | </listitem>
|
---|
| 606 | </varlistentry>
|
---|
| 607 |
|
---|
[2791a8e] | 608 | <varlistentry id="libssp">
|
---|
| 609 | <term><filename class="libraryfile">libssp</filename></term>
|
---|
| 610 | <listitem>
|
---|
| 611 | <para>Contains routines supporting GCC's stack-smashing protection
|
---|
| 612 | functionality</para>
|
---|
| 613 | <indexterm zone="ch-system-gcc libssp">
|
---|
[afba93b] | 614 | <primary sortas="c-libssp">libssp</primary>
|
---|
[2791a8e] | 615 | </indexterm>
|
---|
| 616 | </listitem>
|
---|
| 617 | </varlistentry>
|
---|
| 618 |
|
---|
[6a82dd9] | 619 | <varlistentry id="libstdc">
|
---|
| 620 | <term><filename class="libraryfile">libstdc++</filename></term>
|
---|
| 621 | <listitem>
|
---|
| 622 | <para>The standard C++ library</para>
|
---|
| 623 | <indexterm zone="ch-system-gcc libstdc">
|
---|
| 624 | <primary sortas="c-libstdc++">libstdc++</primary>
|
---|
| 625 | </indexterm>
|
---|
| 626 | </listitem>
|
---|
| 627 | </varlistentry>
|
---|
| 628 |
|
---|
[78cc3be] | 629 | <varlistentry id="libstdcfs">
|
---|
| 630 | <term><filename class="libraryfile">libstdc++fs</filename></term>
|
---|
| 631 | <listitem>
|
---|
| 632 | <para>ISO/IEC TS 18822:2015 Filesystem library</para>
|
---|
| 633 | <indexterm zone="ch-system-gcc libstdcfs">
|
---|
| 634 | <primary sortas="c-libstdc++fs">libstdc++fs</primary>
|
---|
| 635 | </indexterm>
|
---|
| 636 | </listitem>
|
---|
| 637 | </varlistentry>
|
---|
| 638 |
|
---|
[6a82dd9] | 639 | <varlistentry id="libsupc">
|
---|
| 640 | <term><filename class="libraryfile">libsupc++</filename></term>
|
---|
| 641 | <listitem>
|
---|
| 642 | <para>Provides supporting routines for the C++ programming
|
---|
| 643 | language</para>
|
---|
| 644 | <indexterm zone="ch-system-gcc libsupc">
|
---|
| 645 | <primary sortas="c-libsupc++">libsupc++</primary>
|
---|
| 646 | </indexterm>
|
---|
| 647 | </listitem>
|
---|
| 648 | </varlistentry>
|
---|
| 649 |
|
---|
[f6b1d91] | 650 | <varlistentry id="libtsan">
|
---|
| 651 | <term><filename class="libraryfile">libtsan</filename></term>
|
---|
| 652 | <listitem>
|
---|
| 653 | <para>The Thread Sanitizer runtime library</para>
|
---|
| 654 | <indexterm zone="ch-system-gcc libtsan">
|
---|
| 655 | <primary sortas="c-libtsan">libtsan</primary>
|
---|
| 656 | </indexterm>
|
---|
| 657 | </listitem>
|
---|
| 658 | </varlistentry>
|
---|
| 659 |
|
---|
[78cc3be] | 660 | <varlistentry id="libubsan">
|
---|
| 661 | <term><filename class="libraryfile">libubsan</filename></term>
|
---|
| 662 | <listitem>
|
---|
| 663 | <para>The Undefined Behavior Sanitizer runtime library</para>
|
---|
| 664 | <indexterm zone="ch-system-gcc libubsan">
|
---|
| 665 | <primary sortas="c-libubsan">libubsan</primary>
|
---|
| 666 | </indexterm>
|
---|
| 667 | </listitem>
|
---|
| 668 | </varlistentry>
|
---|
| 669 |
|
---|
[6a82dd9] | 670 | </variablelist>
|
---|
| 671 |
|
---|
| 672 | </sect2>
|
---|
[673b0d8] | 673 |
|
---|
| 674 | </sect1>
|
---|