最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【整理】crosstool中如何设置xscale的Tuple’s vendor string(CT_TARGET_VENDOR)

CrossCompiler crifan 5241浏览 0评论

【背景】

折腾:

【记录】在Cygwin下编译gcc-3.4.5-glibc-2.3.6的arm-xscale-linux-gnu交叉编译器

期间,需要搞懂crosstool的Tuple’s vendor string(CT_TARGET_VENDOR),针对于xscale如何设置。

【解决过程】

1.看看 Tuple’s vendor string :

Tuple vendor string

的help:

CT_TARGET_VENDOR:                                          
                                                            
Vendor part of the target tuple.                            
                                                            
A tuple is of the form arch-vendor-kernel-system.           
You can set the second part, vendor, to whatever you see fit.
Use a single word, or use underscores "_" to separate words.
Use neither dash nor space, as it breaks things.            
                                                            
Keep the default (unknown) if you don’t know better.        
                                                            
Symbol: TARGET_VENDOR [=cortex_a8]                          
Prompt: Tuple’s vendor string                               
  Defined at config/toolchain.in:33                         
  Location:                                                 
    -> Toolchain options        

CT_TARGET_VENDOR

2.很明显,其中解释的,算是很清楚了。

对于我们常见的交叉编译器,比如此处我们希望的:

arm-xscale-linux-gnu

对应的名字,分成四部分,对应的是:

arch-vendor-kernel-system

即:

arch=arm

vendor=xscale

kernel=linux

system=gun

而此处,我们要设置的,就是vendor的名字。

3.设置这几个名字的时候,需要注意的是:

(1)不能包含空格或者斜杠’/’ -> 导致名字被断开 ->无法正常成为一个完整的名字

(2)如果包含多个单词,则用下划线

比如,之前看到的,crosstool的sample中,有:

arm-cortex_a8-linux-gnueabi

其中的cortex_a8就是对应的cortex a8中间用下划线,变成的:cortex_a8

4.此处,很明显,对于我们想要:

arm-xscale-linux-gnu

就要在此处,把vendor设置为xscale了:

set vendor to xscale

(xscale) Tuple’s vendor string

 

【总结】

其实,人家crosstool的help,解释的足够清楚,看清提示,再去设置值,就好了。

转载请注明:在路上 » 【整理】crosstool中如何设置xscale的Tuple’s vendor string(CT_TARGET_VENDOR)

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
89 queries in 0.173 seconds, using 22.23MB memory