GNU free compilation toolchain - Programming On Unix
Hello everyone!

As the title say, I'm currently trying to setup a compilation toolchain (for C programs) that would not depend on any GNU software (because freedom shouldn't mean "use GNU software").

Do any of you would like to help me on this? I know of clang, which works great. But I'd like to explore more options, using alternative compilers/assembler/linkers. To former being the hardest to find it seems.

For now, here is what I'm using:
  • libc - musl
  • preprocessor - pcc
  • compiler - pcc
  • assembler - nasm?
  • linker - ???

If you have better options, please share!
I found some good linkers that might be worth a shot.

The Byte Optimized Linker - a x86_64 ELF linker (has some limitations compared to other linkers)
The Rape 'n Load Linker (yes i know the name is fucking stupid) - a x86 ELF linker

Some limitations to 'rld':
  • Command line is limited to 255 arguments.
  • Each command line argument is limited to 255 characters.
  • Input/Output elf cannot exceed 2GiB.
  • Currently supporting only x86 architecture.

I know that having separate linkers for separate architecture is annoying, but finding an alternative linker is not easy.
Version: 3.1
G d s+:++ a--- C++ UB P+ L+ !E !W+++ !N !o K--? w++ !O M++ !V PS+++ PE-- Y++ PGP+ !t !5 !X !R tv b+ DI D++ G e- h r y--

buddhist ~ esperantisto ~ communist
Thanks for thosd links, I'll check them out. I found neatld (, but I couldn't make it link a simple brllo world, no matter how hard I tried...
Sweet, looking forward to this.

p.s. you are right, "freedom shouldn't mean "use GNU software"."

(14-05-2015, 04:16 AM)vypr Wrote: The Rape 'n Load Linker (yes i know the name is fucking stupid) - a x86 ELF linker
Waking up this thread, as I made some progress.

I finally build a PCC toolchain using musl as its libc. It's not entirely GNU Free though, as it still need GNU binutils to work. But it's a huge step forward!
I've been looking into elftoolchain (from the fedora project) and elfutils (freebsd iirc) but none of them include an assembler, and only elftoolchain provides a linker (not sure if it's working though).

Regarding the PCC+musl toolchain, I blogged about it, you can find everything about it here:
If you have any questions about it, or think some infos are missing or not crystal clear, tell me and I'll rework this article.
LLVM + lld is also a strong candidate to have a system GNU free. I'm seriously thinking of it.
But I guess we will still need to use a few other GPL softwares, especially for the networking part (final system).
And if I'm not wrong, elftoolchain is a project from FreeBSD.
I never looked much into LLVM and Clang. Even if it's more 'hype' than GNU, I still find them to be too huge for my "minimal" needs. I know it's a dumb statement, But I Like small projects :)
Though after a quick look, lld seems to be a totally standalone project, so it might be worth taking a look. Keep us updated if you give it a go!

(17-08-2015, 08:02 AM)Ypnose Wrote: if I'm not wrong, elftoolchain is a project from FreeBSD.

You were right, I swapped them. elfutils is the fedora project, while elftoolchain is the freebsd one.
I just recently switched from GCC to Clang on OpenBSD, so far so good.
In my opinion, it is astonishing how much GNU has you locked in.
Using another standard library than glibc is surprisingly hard, and gdb does not work with output produced by tcc.
tcc isn't working well as a standard compiler sadly. But works well as a tiny interpreter for small C programs! Anyway, GNU sucks for locking everything like this. I hate them for that

Members  |  Stats  |  Night Mode