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运行的代码。

  • 相关阅读:
    LeetCode 252. Meeting Rooms
    LeetCode 161. One Edit Distance
    LeetCode 156. Binary Tree Upside Down
    LeetCode 173. Binary Search Tree Iterator
    LeetCode 285. Inorder Successor in BST
    LeetCode 305. Number of Islands II
    LeetCode 272. Closest Binary Search Tree Value II
    LeetCode 270. Closest Binary Search Tree Value
    LeetCode 329. Longest Increasing Path in a Matrix
    LintCode Subtree
  • 原文地址:https://www.cnblogs.com/hustdc/p/6273423.html
Copyright © 2011-2022 走看看