gcc.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-gcc" role="wrap">
  8. <?dbhtml filename="gcc.html"?>
  9. <sect1info condition="script">
  10. <productname>gcc</productname>
  11. <productnumber>&gcc-version;</productnumber>
  12. <address>&gcc-url;</address>
  13. </sect1info>
  14. <title>GCC-&gcc-version;</title>
  15. <indexterm zone="ch-system-gcc">
  16. <primary sortas="a-GCC">GCC</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>GCC 软件包包含 GNU 编译器集合,其中有 C 和 C++ 编译器。</para>
  21. <segmentedlist>
  22. <segtitle>&buildtime;</segtitle>
  23. <segtitle>&diskspace;</segtitle>
  24. <seglistitem>
  25. <seg>&gcc-ch6-sbu;</seg>
  26. <seg>&gcc-ch6-du;</seg>
  27. </seglistitem>
  28. </segmentedlist>
  29. </sect2>
  30. <sect2 role="installation">
  31. <title>安装 GCC</title>
  32. <para>在 x86_64 上构建时,修改存放 64 位库的默认路径为
  33. <quote>lib</quote>:</para>
  34. <screen><userinput remap="pre">case $(uname -m) in
  35. x86_64)
  36. sed -e '/m64=/s/lib64/lib/' \
  37. -i.orig gcc/config/i386/t-linux64
  38. ;;
  39. esac</userinput></screen>
  40. <para>删除之前创建的符号链接,以便安装最终的 GCC 头文件:</para>
  41. <screen><userinput remap="pre">rm -f /usr/lib/gcc</userinput></screen>
  42. <para>GCC 文档推荐在专用的构建目录中构建 GCC:</para>
  43. <screen><userinput remap="pre">mkdir -v build
  44. cd build</userinput></screen>
  45. <para>准备安装 GCC:</para>
  46. <screen><userinput remap="configure">SED=sed \
  47. ../configure --prefix=/usr \
  48. --enable-languages=c,c++ \
  49. --disable-multilib \
  50. --disable-bootstrap \
  51. --disable-libmpx \
  52. --with-system-zlib</userinput></screen>
  53. <!--para>Note that for other languages, there are some prerequisites that
  54. are not yet available. See the
  55. <ulink url="&blfs-book;general/gcc.html">BLFS Book</ulink>
  56. for instructions on how to build all of GCC's supported languages.</para-->
  57. <para>请注意,对于其他语言,还有一些尚未满足的依赖项。
  58. 阅读<ulink url="&blfs-book;general/gcc.html">BLFS 手册</ulink>,
  59. 以了解如何构建 GCC 支持的所有语言。</para>
  60. <variablelist>
  61. <title>新的配置选项的含义:</title>
  62. <varlistentry>
  63. <term><envar>SED=sed</envar></term>
  64. <listitem>
  65. <para>设定该环境变量,防止路径 /tools/bin/sed
  66. 被硬编码到编译结果中。</para>
  67. </listitem>
  68. </varlistentry>
  69. <varlistentry>
  70. <term><parameter>--disable-libmpx</parameter></term>
  71. <listitem>
  72. <para>这个开关告诉 GCC 不要构建 mpx (内存保护扩展),
  73. 它在一些处理器上会导致问题,且在下一个 GCC 版本中已被移除。</para>
  74. </listitem>
  75. </varlistentry>
  76. <varlistentry>
  77. <term><parameter>--with-system-zlib</parameter></term>
  78. <listitem>
  79. <para>该选项使得 GCC 链接到系统安装的 Zlib 库,而不是它自带的
  80. Zlib 副本。</para>
  81. </listitem>
  82. </varlistentry>
  83. </variablelist>
  84. <para>编译该软件包:</para>
  85. <screen><userinput remap="make">make</userinput></screen>
  86. <important>
  87. <para>本节中 GCC 的测试套件被认为是关键的,无论如何不能跳过。</para>
  88. </important>
  89. <para>已知 GCC 测试套件中的一组测试可能耗尽栈空间,
  90. 因此运行测试前要增加栈空间:</para>
  91. <screen><userinput remap="test">ulimit -s 32768</userinput></screen>
  92. <para>删除一个已知会导致问题的测试:</para>
  93. <screen><userinput remap="test">rm ../gcc/testsuite/g++.dg/pr83239.C</userinput></screen>
  94. <para>以非特权用户身份测试编译结果,但出错时继续执行其他测试:</para>
  95. <screen><userinput remap="test">chown -Rv nobody .
  96. su nobody -s /bin/bash -c "PATH=$PATH make -k check"</userinput></screen>
  97. <para>输入以下命令查看测试结果的摘要:</para>
  98. <screen><userinput remap="test">../contrib/test_summary</userinput></screen>
  99. <para>如果只想看摘要,将输出用管道送至
  100. <userinput>grep -A7 Summ</userinput>。</para>
  101. <para>可以将结果与 <ulink
  102. url="&test-results;"/> 和
  103. <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>
  104. 的结果进行比较。</para>
  105. <!--para>A few unexpected failures cannot always be avoided. The GCC developers
  106. are usually aware of these issues, but have not resolved them yet.
  107. In particular, six tests in the libstdc++ test suite are known to fail
  108. when running as the root user as we do here.
  109. Unless the test results are vastly different from those at the above URL,
  110. it is safe to continue.</para-->
  111. <para>少量意外的失败有时无法避免,GCC 开发者一般知道这类问题,
  112. 但尚未解决它们。
  113. 我们可以继续安全地构建系统,除非测试结果和以上 URL 的结果截然不同。
  114. </para>
  115. <note><para>
  116. <!--On some combinations of kernel configuration and AMD processors
  117. there may be more than 1100 failures in the gcc.target/i386/mpx
  118. tests (which are designed to test the MPX option on recent
  119. Intel processors). These can safely be ignored on AMD
  120. processors. These tests will also fail on Intel processors if MPX support
  121. is not enabled in the kernel even though it is present on the CPU.-->
  122. 在某些 AMD 处理器上,一些特定的内核配置可以导致 gcc.target/i386/mpx
  123. 中的 1100 多个测试失败(它们被设计为在较新的 Intel 处理器上测试 MPX
  124. 选项)。在 AMD 处理器上可以安全地忽略这些失败。
  125. 另外,如果在内核配置中没有启用 MPX,即使在支持 MPX 的 Intel CPU 上,
  126. 这些测试也会失败。
  127. </para></note>
  128. <para>安装该软件包:</para>
  129. <screen><userinput remap="install">make install</userinput></screen>
  130. <para>创建一个 <ulink
  131. url="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s09.html">FHS</ulink>
  132. 因 <quote>历史原因</quote> 要求的符号链接:</para>
  133. <screen><userinput remap="install">ln -sv ../usr/bin/cpp /lib</userinput></screen>
  134. <para>许多软件包使用 <command>cc</command> 调用 C 编译器。为了满足它们,
  135. 创建一个符号链接:</para>
  136. <screen><userinput remap="install">ln -sv gcc /usr/bin/cc</userinput></screen>
  137. <para>创建一个兼容性符号链接,以支持在构建程序时使用链接时优化(LTO):
  138. </para>
  139. <screen><userinput remap="install">install -v -dm755 /usr/lib/bfd-plugins
  140. ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \
  141. /usr/lib/bfd-plugins/</userinput></screen>
  142. <para>现在最终的工具链已经就位,
  143. 重要的是再次确认编译和链接像我们期望的一样正常工作。
  144. 再一次执行之前进行过的完整性检查:
  145. </para>
  146. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  147. href="adjusting.xml"
  148. xpointer="xpointer(//*[@os='a'])"/>
  149. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  150. href="adjusting.xml"
  151. xpointer="xpointer(//*[@os='b'])"/>
  152. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  153. href="adjusting.xml"
  154. xpointer="xpointer(//*[@os='c'])"/>
  155. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  156. href="adjusting.xml"
  157. xpointer="xpointer(//*[@os='d'])"/>
  158. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  159. href="adjusting.xml"
  160. xpointer="xpointer(//*[@os='e'])"/>
  161. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  162. href="adjusting.xml"
  163. xpointer="xpointer(//*[@os='f'])"/>
  164. <screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded
  165. /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
  166. /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
  167. <!--para>Depending on your machine architecture, the above may differ slightly,
  168. the difference usually being the name of the directory
  169. after <filename class="directory">/usr/lib/gcc</filename>. The important
  170. thing to look for here is that <command>gcc</command> has found all three
  171. <filename>crt*.o</filename> files under the
  172. <filename class="directory">/usr/lib</filename> directory.</para-->
  173. <para>以上结果可能随您的机器体系结构不同而略微不同,
  174. 区别一般是 <filename class="directory">/usr/lib/gcc</filename>
  175. 之后的目录名。我们关注的重点是, <command>gcc</command> 应该在
  176. <filename class="directory">/usr/lib</filename> 目录中找到所有三个
  177. <filename>crt*.o</filename> 文件。</para>
  178. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  179. href="adjusting.xml"
  180. xpointer="xpointer(//*[@os='g'])"/>
  181. <screen><userinput>grep -B4 '^ /usr/include' dummy.log</userinput></screen>
  182. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  183. href="adjusting.xml"
  184. xpointer="xpointer(//*[@os='h'])"/>
  185. <screen><computeroutput>#include &lt;...&gt; search starts here:
  186. /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
  187. /usr/local/include
  188. /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
  189. /usr/include</computeroutput></screen>
  190. <!--para>Again, note that the directory named after your target triplet may be
  191. different than the above, depending on your architecture.</para-->
  192. <para>同样要注意以您的目标三元组命名的目录根据您体系结构的不同,
  193. 可能和以上不同。</para>
  194. <!-- This appears to be obsolete
  195. <note><para>As of version 4.3.0, GCC now unconditionally installs the
  196. <filename>limits.h</filename> file into the private
  197. <filename class="directory">include-fixed</filename> directory, and that
  198. directory is required to be in place.</para></note>
  199. -->
  200. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  201. href="adjusting.xml"
  202. xpointer="xpointer(//*[@os='i'])"/>
  203. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  204. href="adjusting.xml"
  205. xpointer="xpointer(//*[@os='j'])"/>
  206. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  207. href="adjusting.xml"
  208. xpointer="xpointer(//*[@os='k'])"/>
  209. <screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
  210. SEARCH_DIR("/usr/local/lib64")
  211. SEARCH_DIR("/lib64")
  212. SEARCH_DIR("/usr/lib64")
  213. SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
  214. SEARCH_DIR("/usr/local/lib")
  215. SEARCH_DIR("/lib")
  216. SEARCH_DIR("/usr/lib");</computeroutput></screen>
  217. <para>在 32 位系统上可能显示一些不同的目录,例如下面是 i686
  218. 机器上的输出:</para>
  219. <screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")
  220. SEARCH_DIR("/usr/local/lib32")
  221. SEARCH_DIR("/lib32")
  222. SEARCH_DIR("/usr/lib32")
  223. SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
  224. SEARCH_DIR("/usr/local/lib")
  225. SEARCH_DIR("/lib")
  226. SEARCH_DIR("/usr/lib");</computeroutput></screen>
  227. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  228. href="adjusting.xml"
  229. xpointer="xpointer(//*[@os='l'])"/>
  230. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  231. href="adjusting.xml"
  232. xpointer="xpointer(//*[@os='m'])"/>
  233. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  234. href="adjusting.xml"
  235. xpointer="xpointer(//*[@os='n'])"/>
  236. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  237. href="adjusting.xml"
  238. xpointer="xpointer(//*[@os='o'])"/>
  239. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  240. href="adjusting.xml"
  241. xpointer="xpointer(//*[@os='p'])"/>
  242. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  243. href="adjusting.xml"
  244. xpointer="xpointer(//*[@os='q'])"/>
  245. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  246. href="adjusting.xml"
  247. xpointer="xpointer(//*[@os='r'])"/>
  248. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  249. href="adjusting.xml"
  250. xpointer="xpointer(//*[@os='s'])"/>
  251. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  252. href="adjusting.xml"
  253. xpointer="xpointer(//*[@os='t'])"/>
  254. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  255. href="adjusting.xml"
  256. xpointer="xpointer(//*[@os='u'])"/>
  257. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  258. href="adjusting.xml"
  259. xpointer="xpointer(//*[@os='v'])"/>
  260. <para>最后移动一个位置不正确的文件:</para>
  261. <screen><userinput remap="install">mkdir -pv /usr/share/gdb/auto-load/usr/lib
  262. mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
  263. </sect2>
  264. <sect2 id="contents-gcc" role="content">
  265. <title>GCC 的内容</title>
  266. <segmentedlist>
  267. <segtitle>安装的程序</segtitle>
  268. <segtitle>安装的库</segtitle>
  269. <segtitle>安装的目录</segtitle>
  270. <seglistitem>
  271. <seg>c++, cc (到 gcc 的链接), cpp, g++, gcc,
  272. gcc-ar, gcc-nm, gcc-ranlib, 以及 gcov</seg>
  273. <seg>libasan.{a,so}, libatomic.{a,so}, libgcc.a, libgcc_eh.a,
  274. libgcc_s.so, libgcov.a, libgomp.{a,so}, libiberty.a, libitm.{a,so},
  275. liblto_plugin.so,
  276. libquadmath.{a,so}, libssp.{a,so},
  277. libssp_nonshared.a, libstdc++.{a,so}, libsupc++.a, 以及 libtsan.{a,so}</seg>
  278. <seg>/usr/include/c++, /usr/lib/gcc, /usr/libexec/gcc, 以及
  279. /usr/share/gcc-&gcc-version;</seg>
  280. </seglistitem>
  281. </segmentedlist>
  282. <variablelist>
  283. <bridgehead renderas="sect3">简要描述</bridgehead>
  284. <?dbfo list-presentation="list"?>
  285. <?dbhtml list-presentation="table"?>
  286. <varlistentry id="c">
  287. <term><command>c++</command></term>
  288. <listitem>
  289. <para>C++ 编译器</para>
  290. <indexterm zone="ch-system-gcc c">
  291. <primary sortas="b-c++">c++</primary>
  292. </indexterm>
  293. </listitem>
  294. </varlistentry>
  295. <varlistentry id="cc">
  296. <term><command>cc</command></term>
  297. <listitem>
  298. <para>C 编译器</para>
  299. <indexterm zone="ch-system-gcc cc">
  300. <primary sortas="b-cc">cc</primary>
  301. </indexterm>
  302. </listitem>
  303. </varlistentry>
  304. <varlistentry id="cpp">
  305. <term><command>cpp</command></term>
  306. <listitem>
  307. <para>C 预处理器,编译器使用它展开源文件中的 #include、#define
  308. 及类似指令</para>
  309. <indexterm zone="ch-system-gcc cpp">
  310. <primary sortas="b-cpp">cpp</primary>
  311. </indexterm>
  312. </listitem>
  313. </varlistentry>
  314. <varlistentry id="g">
  315. <term><command>g++</command></term>
  316. <listitem>
  317. <para>C++ 编译器</para>
  318. <indexterm zone="ch-system-gcc g">
  319. <primary sortas="b-g++">g++</primary>
  320. </indexterm>
  321. </listitem>
  322. </varlistentry>
  323. <varlistentry id="gcc">
  324. <term><command>gcc</command></term>
  325. <listitem>
  326. <para>C 编译器</para>
  327. <indexterm zone="ch-system-gcc gcc">
  328. <primary sortas="b-gcc">gcc</primary>
  329. </indexterm>
  330. </listitem>
  331. </varlistentry>
  332. <varlistentry id="gcc-ar">
  333. <term><command>gcc-ar</command></term>
  334. <listitem>
  335. <!--para>A wrapper around <command>ar</command> that adds a
  336. plugin to the command line. This program is only used
  337. to add "link time optimization" and is not useful with the
  338. default build options</para-->
  339. <para><command>ar</command> 的一个包装器,
  340. 它在命令行中添加一个插件。这个程序只被用于提供链接时优化功能,
  341. 对于默认的构建选项来说没有作用。</para>
  342. <indexterm zone="ch-system-gcc gcc-ar">
  343. <primary sortas="b-gcc-ar">gc-ar</primary>
  344. </indexterm>
  345. </listitem>
  346. </varlistentry>
  347. <varlistentry id="gcc-nm">
  348. <term><command>gcc-nm</command></term>
  349. <listitem>
  350. <!--para>A wrapper around <command>nm</command> that adds a
  351. plugin to the command line. This program is only used
  352. to add "link time optimization" and is not useful with the
  353. default build options</para-->
  354. <para><command>nm</command> 的一个包装器,
  355. 它在命令行中添加一个插件。这个程序只被用于提供链接时优化功能,
  356. 对于默认的构建选项来说没有作用。</para>
  357. <indexterm zone="ch-system-gcc gcc-nm">
  358. <primary sortas="b-gcc-nm">gc-nm</primary>
  359. </indexterm>
  360. </listitem>
  361. </varlistentry>
  362. <varlistentry id="gcc-ranlib">
  363. <term><command>gcc-ranlib</command></term>
  364. <listitem>
  365. <!--para>A wrapper around <command>ranlib</command> that adds a
  366. plugin to the command line. This program is only used
  367. to add "link time optimization" and is not useful with the
  368. default build options</para-->
  369. <para><command>ranlib</command> 的一个包装器,
  370. 它在命令行中添加一个插件。这个程序只被用于提供链接时优化功能,
  371. 对于默认的构建选项来说没有作用。</para>
  372. <indexterm zone="ch-system-gcc gcc-ranlib">
  373. <primary sortas="b-gcc-ranlib">gc-ranlib</primary>
  374. </indexterm>
  375. </listitem>
  376. </varlistentry>
  377. <varlistentry id="gcov">
  378. <term><command>gcov</command></term>
  379. <listitem>
  380. <para>一个覆盖率测试工具;
  381. 用于分析程序并确定在哪里优化最有效</para>
  382. <indexterm zone="ch-system-gcc gcov">
  383. <primary sortas="b-gcov">gcov</primary>
  384. </indexterm>
  385. </listitem>
  386. </varlistentry>
  387. <varlistentry id="libasan">
  388. <term><filename class="libraryfile">libasan</filename></term>
  389. <listitem>
  390. <para>地址完整性检查库</para>
  391. <indexterm zone="ch-system-gcc libasan">
  392. <primary sortas="b-libasan">libasan</primary>
  393. </indexterm>
  394. </listitem>
  395. </varlistentry>
  396. <varlistentry id="libgcc">
  397. <term><filename class="libraryfile">libgcc</filename></term>
  398. <listitem>
  399. <para>包含 <command>gcc</command> 的运行时支持</para>
  400. <indexterm zone="ch-system-gcc libgcc">
  401. <primary sortas="c-libgcc">libgcc</primary>
  402. </indexterm>
  403. </listitem>
  404. </varlistentry>
  405. <varlistentry id="libgcov">
  406. <term><filename class="libraryfile">libgcov</filename></term>
  407. <listitem>
  408. <para>在 GCC 被指示启动性能剖析时,这个库被链接到程序中</para>
  409. <indexterm zone="ch-system-gcc libgcov">
  410. <primary sortas="c-libgcov">libgcov</primary>
  411. </indexterm>
  412. </listitem>
  413. </varlistentry>
  414. <varlistentry id="libgomp">
  415. <term><filename class="libraryfile">libgomp</filename></term>
  416. <listitem>
  417. <para>OpenMP API 的 GNU 实现,用于 C/C++ 和 Fortran
  418. 的跨平台共享内存并行编程</para>
  419. <indexterm zone="ch-system-gcc libgomp">
  420. <primary sortas="c-libgomp">libgomp</primary>
  421. </indexterm>
  422. </listitem>
  423. </varlistentry>
  424. <varlistentry id="libiberty">
  425. <term><filename class="libraryfile">libiberty</filename></term>
  426. <listitem>
  427. <para>包含若干 GNU 程序使用的子程序,如
  428. <command>getopt</command>, <command>obstack</command>,
  429. <command>strerror</command>, <command>strtol</command>, and
  430. <command>strtoul</command></para>
  431. <indexterm zone="ch-system-gcc libiberty">
  432. <primary sortas="c-libiberty">libiberty</primary>
  433. </indexterm>
  434. </listitem>
  435. </varlistentry>
  436. <varlistentry id="liblto_plugin">
  437. <term><filename class="libraryfile">liblto_plugin</filename></term>
  438. <listitem>
  439. <para>GCC 的链接时优化 (LTO) 插件,
  440. 使得 GCC 可以进行跨越编译单元的优化</para>
  441. <indexterm zone="ch-system-gcc liblto_plugin">
  442. <primary sortas="c-liblto_plugin">liblto_plugin</primary>
  443. </indexterm>
  444. </listitem>
  445. </varlistentry>
  446. <varlistentry id="libquadmath">
  447. <term><filename class="libraryfile">libquadmath</filename></term>
  448. <listitem>
  449. <para>GCC 四精度数学 API 库</para>
  450. <indexterm zone="ch-system-gcc libquadmath">
  451. <primary sortas="c-libquadmath">libquadmath</primary>
  452. </indexterm>
  453. </listitem>
  454. </varlistentry>
  455. <varlistentry id="libssp">
  456. <term><filename class="libraryfile">libssp</filename></term>
  457. <listitem>
  458. <para>包含 GCC 的栈溢出保护功能支持子程序</para>
  459. <indexterm zone="ch-system-gcc libssp">
  460. <primary sortas="c-libssp">libssp</primary>
  461. </indexterm>
  462. </listitem>
  463. </varlistentry>
  464. <varlistentry id="libstdc">
  465. <term><filename class="libraryfile">libstdc++</filename></term>
  466. <listitem>
  467. <para>C++ 标准库</para>
  468. <indexterm zone="ch-system-gcc libstdc">
  469. <primary sortas="c-libstdc++">libstdc++</primary>
  470. </indexterm>
  471. </listitem>
  472. </varlistentry>
  473. <varlistentry id="libsupc">
  474. <term><filename class="libraryfile">libsupc++</filename></term>
  475. <listitem>
  476. <para>包含 C++ 编程语言支持子程序</para>
  477. <indexterm zone="ch-system-gcc libsupc">
  478. <primary sortas="c-libsupc++">libsupc++</primary>
  479. </indexterm>
  480. </listitem>
  481. </varlistentry>
  482. <varlistentry id="libtsan">
  483. <term><filename class="libraryfile">libtsan</filename></term>
  484. <listitem>
  485. <para>线程完整性检查库</para>
  486. <indexterm zone="ch-system-gcc libtsan">
  487. <primary sortas="c-libtsan">libtsan</primary>
  488. </indexterm>
  489. </listitem>
  490. </varlistentry>
  491. </variablelist>
  492. </sect2>
  493. </sect1>