Welcome to the Linux Foundation Forum!

ln -s?

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 ???

Comments

  • atreyu
    atreyu Posts: 216
    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
  • 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.
  • Have not tried

    This is a good question
  • altNull
    altNull Posts: 65
    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.
  • chatpong
    chatpong Posts: 2
    This is the good question. I'll try to make it.

Categories

Upcoming Training