configure에서 --host와 --build의 차이?
Specifying the System Type
==========================There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will
produce code for.If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
안녕하세요.
컴파일시 configure에서 옵션중에
--host
--build
--target
이 세가지가 있는데요 여기서 혼란스럽습니다.
--host는 컴파일을 하는 시스템이고,
--build는 컴파일해서 돌아갈 플렛폼
--target도 컴파일해서 돌아갈 플렛폼
인데
--host와 --target는 cross compile할 때 사용하는 것이고
--build는 컴파일되는 컴퓨터에서 자신이 사용할 코드를 컴파일 할 때
자신의 type을 정의하는 것인지 궁금합니다. ^^;;
아니면 --host와 --target --build 모두 적어주어야 하는지요?
감사합니다.
Re: configure에서 --host와 --build의 차이?
http://www.belgeler.org/autobook/autobook-Building-with-a-Cross-Compiler.html
즉 Linux에서 빌드를 하는데 만드는 컴파일러가 dos에서 실행되는 컴파일러이고, 이 컴파일러의 출력코드는 mips용이라면
--build : linux
--host : dos
--target : mips
가 됩니다. 이런 경우를 canadian cross라고 하죠. 캐나다에 세 민족이 살아서 그런데나... 물론 이런 canadian cross는 library 때문에 빌드가 상당히 복잡해집니다.
기본적으로는 host, target, build를 모두 적어주어야 합니다. 단, 적어주지 않는 경우 config.guess script에서 나머지를 default로 현재 platform으로 설정합니다.
그래서
canadian cross 인 경우에는 --host, --target을 정확히 적어주어야 하고,
cross인 경우에는 --target 만을 정확히 적어주면 되고,
일반적인 경우에는 아무것도 적어주지 않아도 됩니다.
댓글 달기