LinuxSir.cn,穿越时空的Linuxsir!

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

lfs可以使用ccache吗?

[复制链接]
发表于 2003-8-13 20:42:21 | 显示全部楼层 |阅读模式
我想在lfs里用ccache。

谢谢了。
发表于 2003-8-13 21:08:31 | 显示全部楼层
why not
只要是Linux,就可以用
其它Unix就不清楚了
 楼主| 发表于 2003-8-13 21:21:48 | 显示全部楼层
Gentoo可以在/etc/make.conf里启用它,在lfs也是这样吗?
发表于 2003-8-13 21:36:28 | 显示全部楼层

又学到了,我要试试

据说有两种方法启用,
一是设置CC="ccache gcc"
二是 ln -s ccache cc (不知道理解的对不对)

http://ccache.samba.org/

You can use ccache in two ways. The first is just to prefix your compile commands with "ccache". For example, you could change the "CC=gcc" line in your Makefile to be "CC=ccache gcc".
Alternatively, you can create symbolic links from your compilers name to ccache. This allows you to use ccache without any changes to your build system.
 楼主| 发表于 2003-8-14 00:16:21 | 显示全部楼层
第二条:
cc不是gcc的符号连接吗?怎么这么调用啊,好奇怪。我的英文很差,更不理解的啦。
 楼主| 发表于 2003-8-14 00:19:41 | 显示全部楼层
CC='ccache gcc'可以写在/etc/profile吧。
发表于 2003-8-14 06:02:39 | 显示全部楼层
cc可以是gcc的连接,也可以是其他编译器的连接啊.
发表于 2003-8-14 06:11:24 | 显示全部楼层

我是这样用的

gentoo,make.conf里面设置emerge使用ccache
对于普通编译,我的系统$PATH里面/usr/local/bin在/usr/bin之前,然后
ln -s /usr/bin/ccache /usr/local/bin/gcc
ln -s /usr/bin/ccache /usr/local/bin/g++
ln -s /usr/bin/ccache /usr/local/bin/cc
ln -s /usr/bin/ccache /usr/local/bin/c++

其实有了这几条,前面的make.conf就无所谓了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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