[cfe-dev] How could I get clang with musl into fresh linux distribution?
Karen Shaeffer
shaeffer at neuralscape.com
Sun Oct 13 11:46:32 PDT 2013
On Sun, Oct 13, 2013 at 04:23:16PM +0300, Henri Tuhola wrote:
> Hello
>
> I've been excited about possibility to make it easier to create linux
> distribution from scratch. For that I've been working on a study linux
> distribution that I call lelux: https://github.com/cheery/lelux
>
> If I wanted to get my distribution further than this I should get a
> compiler inside the distribution. I suppose clang would be easy target
> because it's well-structured and based on LLVM, which is itself really sane
> project. I would also like if it used musl instead of glibc.
>
> So, how could I compile myself a clang, which compiles software with musl,
> and would work within a really bare linux distribution, such as the one I
> made with handful of system files?
>
> I've seen and tried http://wiki.musl-libc.org/wiki/BuildingLLVM but I
> wonder if things have changed since that page was written.
--- end quoted text ---
Hi Henri,
Hopefully you already know there already is a linux from scratch.
http://www.linuxfromscratch.org
I can tell you that project is vibrant and very useful in designing minimal,
customized linux distributions. It is very educational to work with it. Appears
you just want to use the clang/llvm tool chain. All the answers you need follow
from understanding the tool chain linuxfromscratch uses. They do an excellent job
of highlighting the intricacies of the tool chain and the dependencies on the
minimal distribution. For example, the order to build such packages and how to
bootstrap the compiler.
If I were you, I would start there. And then just swap out the tool chains in
an iterative way. Obviously you are going to have to take responsibility for
modifying the build scripts to work with clang and llvm. I think your biggest
problem will be in building the linux kernel.
enjoy,
Karen
--
Karen Shaeffer Be aware: If you see an obstacle in your path,
Neuralscape Services that obstacle is your path. Zen proverb
More information about the cfe-dev
mailing list