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