zoukankan      html  css  js  c++  java
  • 关于gcc

    1 the architecture of gcc

    2 自己编译gcc时的 --build --host --target选项的含义和用法

    <1> --build

    执行本次的gcc编译的主机,就是该configure脚本运行的主机系统。这个参数可以由config.guess自动获取。也可以自己指定。

    <2> --host

    执行完本次编译之后,将生成一个新的gcc的二进制程序,host指定的是该gcc程序所运行的主机系统。如果是本机执行,那么

    该值就等于build。如果生成的gcc在其它机器上执行,那么host和build不同。

    <3> --target

    执行完本次编译,我们将会得到一个新的gcc,这个gcc将会用来编译其它新的程序,这个target用来指定这些新的程序所运行

    的主机系统。

    对于本地编译,也就是说,编译出的gcc运行在本机上,编译出的gcc编译的其它程序也运行在本机上。


    以编译binutils为例:
    <1> "./configure --build=mipsel-linux --host=mipsel-linux --target=mipsel-linux"
    用主机系统为mipsel-linux上的编译器对binutils进行编译,编译出来的binutils运行在mipsel-linux的主机系统上,这个binutils用来编译能够在mipsel-linux主机系统上运行的代码。

    <2> "./configure --build=i386-linux --host=mipsel-linux --target=mipsel-linux"
    用主机系统为i386-linux上的编译器对binutils进行编译,编译出来的binutils运行在mipsel-linux上,这个binutils用来编译能够在mipsel-linux运行的代码。
    <3> "./configure --build=i386-linux --host=i386-linux --target=mipsel-linux"
    用主机系统为i386-linux上的编译器对binutils进行编译,编译出来的binutils运行在i386-linux上,这个binutils用来编译能够在mipsel-linux运行的代码。

    <4> "./configure --build=mipsel-linux --host=i386-linux --target=mipsel-linux"
    用主机系统为mipsel-linux的编译器对binutils进行编译,编译出来的binutils运行在i386-linux,这个binutils用来编译能够在mipsel-linux运行的代码。

  • 相关阅读:
    hdoj--1162--Eddy's picture(最小生成树)
    hdoj--1087--Super Jumping! Jumping! Jumping!(贪心)
    hdoj--1051--Wooden Sticks(LIS)
    hdoj--5532--Almost Sorted Array(正反LIS)
    CodeForces--609C --Load Balancing(水题)
    poj--2631--Roads in the North(树的直径 裸模板)
    CodeForces--606A --Magic Spheres(模拟水题)
    CodeForcess--609B--The Best Gift(模拟水题)
    hdoj--1201--18岁生日(模拟)
    poj--1985--Cow Marathon(树的直径)
  • 原文地址:https://www.cnblogs.com/hustdc/p/6273423.html
Copyright © 2011-2022 走看看