gcc.xml 24 KB

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