金更换LD - 的经验吗? [英] Replacing ld with gold - any experience?

查看:243
本文介绍了金更换LD - 的经验吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人尝试过​​使用 而不是 LD

Has anyone tried to use gold instead of ld?

承诺比<快得多code> LD ,所以它可以帮助大型C ++应用程序加速测试周期,但它可以被用来作为直接替换为LD?

gold promises to be much faster than ld, so it may help speeding up test cycles for large C++ applications, but can it be used as drop-in replacement for ld?

能否 GCC / G ++ 直接调用。 ?

Can gcc/g++ directly call gold.?

是否有任何认识错误或问题?

Are there any know bugs or problems?

虽然是因为尽管GNU binutils的一部分,我发现几乎在Web没有成功的故事,甚至HOWTO文档。

Although gold is part of the GNU binutils since a while, I have found almost no "success stories" or even "Howtos" in the Web.

更新:增加了链接到黄金和博客条目解释它的)

推荐答案

目前它被编译在Ubuntu 10.04更大的项目的时刻。在这里,您可以安装和方便地与的binutils金封装集成(如果您删除该程序包,你会得到你的旧 LD )。 GCC将自动使用金即可。

At the moment it is compiling bigger projects on Ubuntu 10.04. Here you can install and integrate it easily with the binutils-gold package (if you remove that package, you get your old ld). Gcc will automatically use gold then.

的一些经验:


  • 金不的/ usr / local / lib目录
  • 搜索
  • 金不承担喜欢的pthread或RT库,必须手工将它们添加

  • 这是速度更快,需要更少的内存(后来是大C ++有很多提升等项目很重要的。)

什么不起作用:它不能编译内核的东西,因此没有内核模块。 Ubuntu的通过DKMS自动执行此操作,如果它更新专有驱动的fglrx一样。这将失败, LD-金(必须删除金,重启DKMS,重新安装 LD-金

What does not work: It cannot compile kernel stuff and therefore no kernel modules. Ubuntu does this automatically via DKMS if it updates proprietary drivers like fglrx. This fails with ld-gold (you have to remove gold, restart DKMS, reinstall ld-gold.

这篇关于金更换LD - 的经验吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆