📄 [原创]gcc-3_4_4安装配置指南 - 打造你自己的gcc ! - linuxsir_org.htm
字号:
汇编器和连接器<br />选项的集合可用于确定汇编器和连接器的名称和位置。但是如果没有使用这些选项的话,将会使用下面两个步骤进行定位:<br />1,查找<prefix>/lib/<B style='color:black;background-color:#A0FFFF'>gcc</B>-lib/<target>/<version>目录<br />2,跟操作系统相关的目录,如linux中的/usr/bin<br /><br />-------------------------<br />接着具体讲讲选项<br /><br />--prefix=<prefix> 地球人都知道这个是<B style='color:black;background-color:#A0FFFF'>GCC</B>的安装根目录。默认为/usr/local<br /><br />--host=<host> 平台名。默认为config.guess的结果。<br /><br />--build=<host> 产生在指定主机上运行的<B style='color:black;background-color:#ffff66'>配置</B>。默认和--host选项的值相同。<br /><br />--target=<host> 指定目标机器(运行编译程序的机器),默认为config.guess的结果。<br /><br />--cache-file=<cache-file> configure脚本会运行各种测试来确定本地机器的<B style='color:black;background-color:#ffff66'>配置</B>和性能,这里指定的文件将包含这些测试的结果。<br /><br />--enable-cpp 安装cpp[C预处理程序],这是默认值。<br /><br />--enable-checking[=misc,tree,gc,rtl,gcac] 该选项会产生执行编译程序内部检查的代码。这种检查会产生诊断输出并会增加编译时间,但是对输出结果没有影响。<br /> 对从CVS下载来编译的这是默认选项,但是正式发布的版本不是。可以从上述5个中选择你想要检查的项目(逗号隔开的列表),若省略列表则仅检查前3项(后两项超慢)。<br /><br />--enable-languages=lang0,[lang1,lang2 ...] 指定只安装指定的语言支持,可以使用的语言是:ada, c, c++, f77, f95, java, objc<br /> 若不指定该选项则安默认装所有可用的语言支持。<br /><br />--enable-libgcj 创建java运行时库,这是默认值。若你使用其他的运行时库,可以禁用它。<br /><br />--enable-maintainer-mode 要求从源代码重新生成<B style='color:black;background-color:#A0FFFF'>gcc</B>.pot文件。该文件是主消息分类,包括编译程序产生的所有错误和警告的诊断消息。该文件用来实现国际化。<br /> [注意]要使该选项正常工作,需要完整的源代码树个gettext的最新版本。<br /><br />--enable-multilib 构建目标系统上的多个库,在大多数系统上该选项是默认值。可以通过--disable-xxxx禁止生成某些特定的库。[如果你是x86体系,就别关心这个选项了]<br /><br />--enable-nls 指定本地语言支持是编译程序的一部分(非默认),它允许按照非英语的本地语言显示警告和错误消息。<br /><br />--enable-shared 创建共享库,这是默认值。--disable-shared将只创建静态库。<br /><br />--enable-target-optspace 要求在尺寸上对库进行优化,而不是在速度上。(非默认)<br /><br />--enable-threads 启用线程支持,在某些平台上是默认值。它对Obj-C的库以及C++,Java的异常处理有影响。可以用--disable-threads禁用线程支持[大概没人这么干]。<br /><br />--enable-threads=<lib> 进一步明确指定支持线程的库的名字。可用的库名为:aix,dce,no[禁用线程],posix,rtems,solaris,vxworks,win32[微软]<br /><br />--help 显示选项列表和相应的解释。<br /><br />--no-create 运行configure<B style='color:black;background-color:#ffff66'>配置</B>脚本,但是并不创建编译代码所需要的输出文件,可用于测试。<br /><br />--norecursion 指示源代码树的每个目录都包含独立的configure脚本。除非明确指定该选项,否则运行一个目录中的configure脚本也会运行其子目录中的所有configure脚本。<br /><br />--silent 禁止打印configure脚本的输出信息。这些信息通常显示在屏幕上,一般是各种测试信息。<br /><br />--srcdir=<srcdir> 指定包含configure.in文件的目录。该文件提供configure使用的关于源文件名字和位置的信息。<br /><br />--tmpdir=<tmpdir> 指定用来保存临时工作文件的目录。<br /><br />--version 显示创建configure脚本的Auotoconfig工具的版本号。<br /><br />--with-as=<as-path> 指定汇编器的绝对路径名。如果configure的默认查找过程找不到汇编器,就会需要该选项。或者系统中有多个汇编器,也需要它来指定使用哪一个。<br /> [注意]如果使用GNU的汇编器,那么你就必须同时使用GNU连接器。<br />--with-ld=<ld-path> 指定连接器的绝对路径名。如果configure的默认查找过程找不到连接器,就会需要该选项。或者系统中有多个连接器,也需要它来指定使用哪一个。<br /><br />--with-catgets 如果通过--enable-nls启用了NLS,但是主机没有安装settext,编译程序就需要使用主机的catgets。<br /><br />--with-included-gettext 如果通过--enable-nls启用了NLS,该选项指出构建进程在使用系统安装的版本以前,要尝试使用自己的gettext备份。<br /><br />--with-cpu=<cpu> 指出目标平台的CPU。如果为平台选择一种特定的CPU,<B style='color:black;background-color:#A0FFFF'>GCC</B>就能生成针对特定CPU的更优化的代码。具体可以使用哪些cpu请查看config.<B style='color:black;background-color:#A0FFFF'>gcc</B><br /><br />--with-dwarf2 指定编译程序产生的调试信息,默认为DWARF2格式。<br /><br />--with-headers=<head-dir> 指出创建包含交叉编译程序的目标的头文件。若<prefix>/<target>/sys-include不存在,则必须用该选项指定。<br /> 头文件必须复制到<B style='color:black;background-color:#A0FFFF'>GCC</B>的安装目录并被修改才能保持兼容。<br />--with-libs=<lib-dir-list> 该选项适用于创建交叉编译程序。指定目录列表中的库会被复制到<B style='color:black;background-color:#A0FFFF'>GCC</B>的安装目录中。<br />--with-newlib 该选项用于构建交叉编译程序。库newlib用于目标机器的C库。<br /><br />--with-local-prefix=<loc-prefix> 编译程序用来查找安装在本地的包含文件目录的前缀,默认为/usr/local。<br /> 只有在系统已经建立了某些特定的目录规则,而不再是在/usr/local/include中查找本地安装的头文件的时候,该选项才使必须的。<br /> 该选项不能设置为/usr,因为安装的头文件会和系统的头文件混合,从而造成冲突,导致不能编译某些程序。<br /> --prefix选项对该选项没有影响,--prefix仅仅指定<B style='color:black;background-color:#A0FFFF'>GCC</B>的安装目录,而该选项指定在运行时到哪里查找头文件。<br /><br />--with-slibdir=<slib-dir> 包含共享库的目录名,默认是<prefix>/lib<br /><br />--with-stabs 指定编译程序产生的调试信息为stabs格式,而不是宿主系统的默认格式。通常<B style='color:black;background-color:#A0FFFF'>GCC</B>产生的默认调试信息是ECOFF格式,但是它包含的调试信息没有stabs多。<br /><br />--with-system-zlib 指示编译程序使用系统上已有的zlib,而不是创建一个新的。仅用于java。<br /><br />--with-x 指示要使用X Window System 。不想用的话就without<br />--x-includes=<x-inc-dir> 指定包含X包含文件的目录。<br />--x-libraries=<x-lib-dir> 指定包含X库的目录名。<br /><br />======================<br />题外话,没想到版主昨天这么器重俺写的玩意儿 <img src="images/smilies/0Wonder.gif" border="0" alt="" title="吃惊" class="inlineimg" /> ,居然连续给加了两个[精],呵呵,高兴一下,今天再来一贴!<br />高兴ing... <img src="images/smilies/cool.gif" border="0" alt="" title="牛" class="inlineimg" /> <img src="images/smilies/cool.gif" border="0" alt="" title="牛" class="inlineimg" /></div>
<!-- / message -->
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:#c6dbff" />
<em>
此帖于 08-03-03 <span class="time">13:23</span> 被 csfrank 编辑.
</em>
</div>
<!-- / edit note -->
</td>
</tr>
<tr>
<td class="alt2">
</td>
<td class="alt2" align="left">
<!-- vB 中文修改开始: QQ 插件 -->
<!-- vB 中文修改结束 -->
<img class="inlineimg" src="images/statusicon/user_offline.gif" alt="csfrank 当前离线" border="0" />
</td>
<td class="alt2" align="right">
<!-- controls -->
<!-- vB 中文修改开始: 银行 -->
<!-- vB 中文修改结束 -->
<a href="newreply.php?s=47951266dc771287d7b641586d8ebbc1&do=newreply&p=1283488" rel="nofollow"><img src="images/buttons/quote.gif" alt="回复时引用此帖" border="0" /></a>
<!-- / controls -->
</td>
</tr>
</table>
<!-- post 1283488 popup menu -->
<div class="vbmenu_popup" id="postmenu_1283488_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">csfrank</td>
</tr>
<tr><td class="vbmenu_option"><a href="member.php?s=47951266dc771287d7b641586d8ebbc1&u=81489">查看公开信息</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?s=47951266dc771287d7b641586d8ebbc1&do=finduser&u=81489" rel="nofollow">查找 csfrank 发表的更多帖子</a></td></tr>
</table>
</div>
<!-- / post 1283488 popup menu -->
</div>
</div>
</div>
</div>
<!-- / close content container -->
<!-- / post #1283488 -->
</div>
</div>
</div>
</div>
<!-- / close content container -->
<!-- / post #1283488 --><!-- post #1283530 -->
<!-- open content container -->
<div align="center">
<div class="page" style="width:100%; text-align:left">
<div style="padding:0px 0px 0px 0px">
<div id="edit1283530" style="padding:0px 0px 4px 0px">
<!-- this is not the last post shown on the page -->
<!-- post #1283530 -->
<!-- open content container -->
<div align="center">
<div class="page" style="width:100%; text-align:left">
<div style="padding:0px 0px 0px 0px">
<div id="edit1283530" style="padding:0px 0px 4px 0px">
<!-- this is not the last post shown on the page -->
<table id="post1283530" class="tborder" cellpadding="4" cellspacing="0" border="0" width="100%" align="center" style="table-layout:fixed;word-break:break-all">
<tr>
<td class="thead" style="font-weight:normal" width="180" >
<!-- status icon and date -->
<a name="post1283530"><img class="inlineimg" src="images/statusicon/post_old.gif" alt="旧" border="0" /></a>
05-10-07, 13:49
<!-- / status icon and date -->
</td>
<td class="thead" colspan="2" style="font-weight:normal" align="right">
<a href="showpost.php?s=47951266dc771287d7b641586d8ebbc1&p=1283530&postcount=2" target="new" rel="nofollow" id="postcount1283530" name="2"><strong>第 2 帖</strong></a>
</td>
</tr>
<tr valign="top">
<td class="alt2">
<div id="postmenu_1283530">
<a class="bigusername" href="member.php?s=47951266dc771287d7b641586d8ebbc1&u=63787"><strong>soloforce</strong></a>
<!-- vB 中文修改开始: 性别 -->
<img class="inlineimg" src="images/misc/male.gif" alt="帅哥" border="0" />
<!-- vB 中文修改结束 -->
<div class="smallfont"><img src="images/ranks/mod_level.gif" alt="" border="" /></div>
</div>
<br />
<div class="smallfont">
<a href="member.php?s=47951266dc771287d7b641586d8ebbc1&u=63787"><img src="upload/avatars/avatar63787_30.gif" alt="soloforce 的头像" border="0" /></a>
</div>
<br /> <br />
<div class="smallfont" align="left">
<fieldset style="border:#C6C6C6 1px solid;">
<legend class="smallfont" style="color:#000000">版主</legend>
<br />
<div class="smallfont"> 注册日期: Dec 2004</div>
<div class="smallfont">
帖子: 2,258
</div>
<!-- vB 中文修改开始: 精华 -->
<div class="smallfont"> <a href="search.php?s=47951266dc771287d7b641586d8ebbc1&do=finduser&goodnees=1&u=63787">精华</a>: 14</div>
<!-- vB 中文修改结束 -->
<!-- vB 中文修改开始: 银行 -->
<!-- vB 中文修改结束 -->
<!-- vB 中文修改开始: 显示声望 -->
<!-- vB 中文修改结束 -->
<br />
</fieldset>
</div>
</td>
<td class="alt1" colspan="2" id="td_post_1283530">
<br />
<!-- message -->
<div id="post_message_1283530" style="overflow-x: hidden;">赞!<br />
希望能多看到这种原创的技术文章~</div>
<!-- / message -->
<!-- sig -->
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div>
__________________<br />
Athlon X2 3600+ OC 2.5GHz / Kingston DDR2 4G / SATA2 690G / HA01-GT nForce550 / nVIDIA 7300GT /Audigy2 ZS / 22' LCD / FSP Green PS 400W
</div>
<!-- / sig -->
</td>
</tr>
<tr>
<td class="alt2">
</td>
<td class="alt2" align="left">
<!-- vB 中文修改开始: QQ 插件 -->
<!-- vB 中文修改结束 -->
<img class="inlineimg" src="images/statusicon/user_offline.gif" alt="soloforce 当前离线" border="0" />
</td>
<td class="alt2" align="right">
<!-- controls -->
<!-- vB 中文修改开始: 银行 -->
<!-- vB 中文修改结束 -->
<a href="newreply.php?s=47951266dc771287d7b641586d8ebbc1&do=newreply&p=1283530" rel="nofollow"><img src="images/buttons/quote.gif" alt="回复时引用此帖" border="0" /></a>
<!-- / controls -->
</td>
</tr>
</table>
<!-- post 1283530 popup menu -->
<div class="vbmenu_popup" id="postmenu_1283530_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">soloforce</td>
</tr>
<tr><td class="vbmenu_option"><a href="member.php?s=47951266dc771287d7b641586d8ebbc1&u=63787">查看公开信息</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?s=47951266dc771287d7b641586d8ebbc1&do=finduser&u=63787" rel="nofollow">查找 soloforce 发表的更多帖子</a></td></tr>
</table>
</div>
<!-- / post 1283530 popup menu -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -