[llvm-dev] unable to compile llvm with gcc 4.7.4

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Fri Oct 14 13:02:07 PDT 2016


On 13 October 2016 at 12:56,  <sylvain.bertrand at gmail.com> wrote:
> It's my custom distro. My goal is to make it boostrap-able with tinycc (or any
> little C compiler alternative) as a one-man reasonable job. With the removal of
> gcc 4.7 support now official, I would need to have a 3 step bootstrap, adding a
> modern gcc (which is guaranted to compile with iso c++98-ish gcc 4.7.4, feature
> that clang cannot guaranted anymore).

Hi Sylvain,

I have to say, after a while thinking about your use case, I cannot
come up with a better solution than a 3-stage build. :(

Maybe you need to step back a bit and ask yourself: what would be the
system changes to adopt GCC 4.8 natively instead of tinycc.

What distributions do is to compile the base GCC they'll use first,
making sure all the correct libraries in all the correct versions are
bundles in the right places, then use that toolchain for *everything*.

You seem comfortable enough building GCC 4.7, I assume as a side
package, like BSD ports. I'm also assuming you already need GCC (for
packages other than LLVM), then why not make GCC your system compiler?

The dependencies will already be there anyway, and I don't think GCC
4.8's libraries are much bigger than 4.7, so it does seem like an
overall gain.

Of course, it'll mean you'll have to test your packages with GCC 4.8,
but assuming they already use tinycc or GCC 4.7, I hope you'll have
very little additional problems.

Would any of that help?

cheers,
--renato


More information about the llvm-dev mailing list