任何人都可以帮助如何使用multilib支持x86_64架构来构建gcc交叉编译器?那就是从m32和m64 lib支持的源代码构建它。
有一篇很好的文章展示了如何构建一个gcc交叉编译器: http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/ ,但它只用--disable-multilib演示了这种情况。
我正在尝试使用--enable-multilib选项(对于m32和m64)构建x86_64 gcc交叉编译器,而不是--disable-mutlilib。
除非使用arch = x86_64 * - *和--enable-multilib,否则我会这样做 我面临的问题是步骤4.标准C库标题和启动文件
def mozs():
models = [Url1, Url2, Url3, Url4, Url5, Url6, Url7, Url8, Url9, Url10]
for model in models:
moz(model)
def moz(model):
getids = model.objects.values_list('id', flat=True)
for id in getids:
if model.objects.get(id=id).pda == None:
a2 = model.objects.get(id=id).url
authorities = l.urlMetrics([a2], lsapi.UMCols.domainAuthority | lsapi.UMCols.pageAuthority)
authorities = str(authorities)
authorities = authorities.translate(None, '[]')
authorities = ast.literal_eval(authorities)
authorities['keyword'] = id
serializer = MozSerializer(data=authorities, model=model)
if serializer.is_valid():
serializer.save()
print "For %d we added %s" % (id, authorities)
print type(authorities)
class MozSerializer(serializers.Serializer):
pda = serializers.FloatField()
upa = serializers.FloatField()
def __init__(self, data=None, model=model):
self.model = model
self.keyword = serializers.PrimaryKeyRelatedField(queryset=model.objects.all())
super(MozSerializer, self).__init__(data=data)
def save(self):
keyword = self.validated_data['keyword']
pda = self.validated_data['pda']
upa = self.validated_data['upa']
self.model.objects.update(pda=pda, upa=upa)
出现以下错误:
$ make install-bootstrap-headers=yes install-headers
有什么想法吗?
我安装了multilib:
/opt/cross/lib/gcc/x86_64-linux/4.9.2/../../../../x86_64-linux/bin/ld: cannot find crtbegin.o: No such file or directory
/opt/cross/lib/gcc/x86_64-linux/4.9.2/../../../../x86_64-linux/bin/ld: cannot find -lgcc
/opt/cross/lib/gcc/x86_64-linux/4.9.2/../../../../x86_64-linux/bin/ld: cannot find -lgcc_s
/opt/cross/lib/gcc/x86_64-linux/4.9.2/../../../../x86_64-linux/bin/ld: cannot find -lgcc
/opt/cross/lib/gcc/x86_64-linux/4.9.2/../../../../x86_64-linux/bin/ld: cannot find -lgcc_s
/opt/cross/lib/gcc/x86_64-linux/4.9.2/../../../../x86_64-linux/bin/ld: cannot find crtend.o: No such file or director
答案 0 :(得分:0)
从Gentoo项目中查看crossdev,这极大地简化了构建交叉编译器。
根据我的经验,最挑剔的部分通常是找到可以一起成功构建的binutils
,glibc
和gcc
版本。
正如R M建议的那样,除非你愿意,否则你不需要自己构建它。
答案 1 :(得分:-6)
sudo apt-get install gcc-4.9.2