LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1322|回复: 6

什么是工具链?

[复制链接]
发表于 2009-5-17 19:19:07 | 显示全部楼层 |阅读模式
看gcc的升级文档中提到工具链。
什么是工具链? 谢谢
发表于 2009-5-17 20:16:53 | 显示全部楼层
建构系统的最主要工具组合,Linux 下一般是指 binutils/glibc/gcc
回复 支持 反对

使用道具 举报

发表于 2009-5-17 23:24:15 | 显示全部楼层
具体什么包,你emerge -vp system看看就知道了
回复 支持 反对

使用道具 举报

发表于 2009-5-18 00:34:51 | 显示全部楼层
不过,一般所说的工具链确实仅是指binutils/gcc/glibc而已
回复 支持 反对

使用道具 举报

发表于 2009-5-18 08:58:07 | 显示全部楼层
The following text comes "Linux Sea" book,

These additional tools and libraries are of course written by programmers and they must be able to build their code so that it works on your system. Some systems, like Gentoo Linux, even build this software for you instead of relying on the prebuilt software by others. To be able to build these tools, you need the source code of each tool and the necessary tools to convert the source code to executable files.

These tools are called a toolchain: a set of tools that are used as in a chain in order to produce a working application. A general toolchain consists out of a text editor (to write the code in), compiler (to convert code to machine-specific language), linker (to combine machine-code of several sources - including prebuilt "shared" libraries - into a single, executable file) and libraries (those I just mentioned as being "shared" libraries).
回复 支持 反对

使用道具 举报

发表于 2009-5-18 12:14:48 | 显示全部楼层
wiki一下。
回复 支持 反对

使用道具 举报

发表于 2009-5-18 21:33:25 | 显示全部楼层
可以参考一下crossdev , 只输出帮助看一下就行了
生成交叉工具链
  1. $ sudo crossdev arm --help
  2. Usage: crossdev [options] --target TARGET         
  3. Options:
  4.     --b, --binutils ver   Specify version of binutils to use
  5.     --g, --gcc ver        Specify version of gcc to use     
  6.     --k, --kernel ver     Specify version of kernel headers to use
  7.     --l, --libc ver       Specify version of libc to use         
  8.     -S, --stable          Use latest stable versions as default   
  9.     -C, --clean target    Uninstall specified target              
  10.     -P, --portage opts    Options to pass to emerge (see emerge(1))
  11.     --with[out]-headers   Build C library headers before C compiler?
  12. Stage Options:                                                      
  13.     -s0, --stage0         Build just binutils                       
  14.     -s1, --stage1         Also build a C compiler (no libc/C++)     
  15.     -s2, --stage2         Also build kernel headers                 
  16.     -s3, --stage3         Also build the C library (no C++)         
  17.     -s4, --stage4         Also build a C++ compiler [default]      
  18. Extra Fun (must be run after above stages):                        
  19.     --ex-only             Skip the stage steps above               
  20.     --ex-gcc              Build extra gcc targets (gcj/ada/etc...)  
  21.     --ex-gdb              Build a cross gdb
  22.     --ex-insight          Build a cross insight
  23. Target (-t) takes a tuple ARCH-VENDOR-OS-LIBC; see 'crossdev -t help'
  24. $ sudo crossdev -t help
  25. Supported Architectures:
  26.    - alpha                                     - arm / armeb
  27.    - hppa (parisc)                             - ia64
  28.    - i386 / i486 / i586 / i686 (x86)           - m68k
  29.    - mips / mipsel / mips64 / mips64el
  30.    - powerpc (ppc) / powerpc64 (ppc64)
  31.    - sparc / sparc64                           - s390 / s390x
  32.    - sh / sh[1-5] / sh64                       - x86_64 (amd64)
  33. Supported C Libraries:
  34.    - glibc (gnu)
  35.    - klibc       [prob wont work]
  36.    - newlib      [bare metal/no operating system]
  37.    - uclibc      [not all arches are ported]
  38. Special Targets:
  39.    - avr      http://www.nongnu.org/avr-libc/
  40.    - bfin     http://blackfin.uclinux.org/
  41.    - h8300    http://h8300-hms.sourceforge.net/
  42.    - mingw32  http://www.mingw.org/
  43.    - msp430   http://mspgcc.sourceforge.net/
  44.    - nios2    http://www.altera.com/products/ip/processors/nios2/ni2-index.html
  45.    - xc16x    http://www.infineon.com/
  46.    - ee / iop / dvp (ps2) [Playstation 2 targets]
  47.    - ppu / spu (cell) [Cell/Playstation 3 targets]
  48. Softfloat toolchains:
  49.    Include 'softfloat' in the 'vendor' field
  50.    e.g. armeb-softfloat-linux-uclibc  powerpc-booya_softfloat-linux-gnu
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表