Linux.com

ln -s?

Link to this post 07 Jun 09

Not sure exactly how to do this

I'm building a distro from scratch and I'm trying to use " ccache" as the cache for gcc. one way to make sure the ccache is used is to link to gcc, however when I look cc is already linked to gcc? I tried to ln -s to gcc and it doesn't show any link to gcc. Tried to ln -s to gcc,cc,g++
1. If I were to ln- s to cc ?, is the link by directional?
2.I find it hard sometimes to place ccache as a prefix to ./configure, That is after all my alternative. What about passing --with-ccache=/tools/bin/ccache?? or possibly if I do gcc="ccache gcc" \ export gcc ???

Link to this post 07 Jun 09

tw3ak wrote:

Not sure exactly how to do this

I'm building a distro from scratch and I'm trying to use " ccache" as the cache for gcc. one way to make sure the ccache is used is to link to gcc, however when I look cc is already linked to gcc? I tried to ln -s to gcc and it doesn't show any link to gcc. Tried to ln -s to gcc,cc,g++
1. If I were to ln- s to cc ?, is the link by directional?
2.I find it hard sometimes to place ccache as a prefix to ./configure, That is after all my alternative. What about passing --with-ccache=/tools/bin/ccache?? or possibly if I do gcc="ccache gcc" \ export gcc ???

I've gotten around similar compiling issues before with the use of symlinks - but I've never used ccache, so I don't know how that'll work. Does this thread help?
http://www.cmake.org/pipermail/cmake/2003-February/003392.html

Link to this post 29 Jun 09

Have you taken a look at the man page for ccache? There are two methods to use ccache. The first is to prefix your commands with ccache which might be the best approach while building LFS

CC="ccache gcc"

The second is to create symlinks for gcc, g++, and cc point TO ccache. You're doing it the other way around. If you link ccache to gcc, that's no different than simply using gcc.

Link to this post 08 Apr 10

Have not tried

This is a good question

Link to this post 13 Apr 10

Also check Linux from Scratch, its the #1 goto guide for building Linux. There is also the Gentoo, which is not from scratch, but the community is very extensive.

Link to this post 30 Apr 10

This is the good question. I'll try to make it.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board