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