建立GCC:自举程序的优缺点是什么? [英] Building GCC: What are the advantages and disadvantages of bootstrap?

查看:140
本文介绍了建立GCC:自举程序的优缺点是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解引导编译程序构建的作用,但我不了解常规用户的优缺点. (我认为对于GCC维护者而言,这是有价值的.)

I understand what bootstrapping a compiler build does, but I don't understand the advantages and disadvantages for regular users. (I assume there is value for GCC maintainers.)

配置GCC时,有两个选项:--enable-bootstrap--disable-bootstrap.据我了解,对于普通的编译器版本,默认情况下启用了--enable-bootstrap.

When configuring GCC, there are two options: --enable-bootstrap and --disable-bootstrap. As I understand, for vanilla compiler builds, --enable-bootstrap is enabled by default.

关于使用--disable-bootstrap的优缺点,我找不到任何东西.我的 Google-fu 使我失败.我认为构建速度会更快,但缺点是什么?

I cannot find anything on the advantages and disadvantages of using --disable-bootstrap. My Google-fu fails me. I assume the build will be faster, but what are the downsides?

需要明确的是,我正在从v6.1.0官方来源开始使用普通的x86-64 Linux GCC构建.

To be clear, I am doing a vanilla x86-64 Linux GCC build from v6.1.0 official sources.

我问是因为我在这里从头开始看到Linux中使用的选项--disable-bootstrap: http://www.linuxfromscratch.org/lfs/view/development/chapter06/gcc.html

I ask because I see the option --disable-bootstrap used in the Linux from Scratch instructions here: http://www.linuxfromscratch.org/lfs/view/development/chapter06/gcc.html

推荐答案

GCC配置文档说:

--disable-bootstrap
对于本机构建,默认配置是在调用"make"时执行编译器的三阶段引导,以测试GCC是否可以正确编译自身.如果要禁用此过程,可以使用--disable-bootstrap进行配置.

--disable-bootstrap
For a native build, the default configuration is to perform a 3-stage bootstrap of the compiler when ‘make’ is invoked, testing that GCC can compile itself correctly. If you want to disable this process, you can configure with --disable-bootstrap.

--enable-bootstrap
在特殊情况下,即使目标和主机三元组不同,也可能需要执行3阶段构建.当主机可以运行针对目标编译的代码时(例如,主机是i686-linux,目标是i486-linux),这是可能的.从GCC 4.2开始,要执行此操作,必须使用--enable-bootstrap进行显式配置.

--enable-bootstrap
In special cases, you may want to perform a 3-stage build even if the target and host triplets are different. This is possible when the host can run code compiled for the target (e.g. host is i686-linux, target is i486-linux). Starting from GCC 4.2, to do this you have to configure explicitly with --enable-bootstrap.

总的来说,最好不要理会此默认设置.

如果使用--disable-bootstrap,它将执行1阶段构建(每个 Explorer09

If you use --disable-bootstrap, it does a 1-stage build (per Explorer09 in a comment, but I've still not tried it), which could work when a 3-stage build won't.

如果您需要了解更多信息,请阅读文档.

If you need to know more, read the documentation.

这篇关于建立GCC:自举程序的优缺点是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆