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

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 19 06:38:33 PDT 2016


On 10/18/2016 4:54 AM, Renato Golin via llvm-dev wrote:
> Unfortunately, we don't have a C-only front-end, nor you can select
> some C-only libraries in LLVM to compile C-only code. Such a goal
> should have been set from the beginning, and honestly, it would have
> made LLVM's code horrendous to work with.

An option would be to have a C backend again, and then cross-compile the 
toolchain for the new target, but compile it into C, which then can be 
recompiled into binaries on the target platform.

I actually bootstrapped an SML compiler for FreeBSD/ppc this way a while 
back. A part of the compiler was written in SML and there was an option 
to compile SML to C (that was actually one of the ways to generate final 
code: the C output would then be passed to a system C compiler). I think 
the SML compiler was mlton, but I'm not 100% certain.

-Krzysztof

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation


More information about the llvm-dev mailing list