configterms.texi

来自「理解和实践操作系统的一本好书」· TEXI 代码 · 共 62 行

TEXI
62
字号
@c Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.@c This is part of the GCC manual.@c For copying conditions, see the file gcc.texi.@node Configure Terms@section Configure Terms and History@cindex configure terms@cindex canadianThe configure and build process has a long and colorful history, and canbe confusing to anyone who doesn't know why things are the way they are.While there are other documents which describe the configuration processin detail, here are a few things that everyone working on GCC shouldknow.There are three system names that the build knows about: the machine youare building on (@dfn{build}), the machine that you are building for(@dfn{host}), and the machine that GCC will produce code for(@dfn{target}).  When you configure GCC, you specify these with@option{--build=}, @option{--host=}, and @option{--target=}.Specifying the host without specifying the build should be avoided, as@command{configure} may (and once did) assume that the host you specifyis also the build, which may not be true.If build, host, and target are all the same, this is called a@dfn{native}.  If build and host are the same but target is different,this is called a @dfn{cross}.  If build, host, and target are alldifferent this is called a @dfn{canadian} (for obscure reasons dealingwith Canada's political party and the background of the person workingon the build at that time).  If host and target are the same, but buildis different, you are using a cross-compiler to build a native for adifferent system.  Some people call this a @dfn{host-x-host},@dfn{crossed native}, or @dfn{cross-built native}.  If build and targetare the same, but host is different, you are using a cross compiler tobuild a cross compiler that produces code for the machine you'rebuilding on.  This is rare, so there is no common way of describing it.There is a proposal to call this a @dfn{crossback}.If build and host are the same, the GCC you are building will also beused to build the target libraries (like @code{libstdc++}).  If build and hostare different, you must have already built and installed a crosscompiler that will be used to build the target libraries (if youconfigured with @option{--target=foo-bar}, this compiler will be called@command{foo-bar-gcc}).In the case of target libraries, the machine you're building for is themachine you specified with @option{--target}.  So, build is the machineyou're building on (no change there), host is the machine you'rebuilding for (the target libraries are built for the target, so host isthe target you specified), and target doesn't apply (because you're notbuilding a compiler, you're building libraries).  The configure/makeprocess will adjust these variables as needed.  It also sets@code{$with_cross_host} to the original @option{--host} value in case youneed it.The @code{libiberty} support library is built up to three times: oncefor the host, once for the target (even if they are the same), and oncefor the build if build and host are different.  This allows it to beused by all programs which are generated in the course of the buildprocess.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?