[LLVMdev] cfrontend building
Chris Lattner
sabre at nondot.org
Tue Aug 9 09:22:04 PDT 2005
On Tue, 9 Aug 2005, Stephan Wienczny wrote:
> I found the problem. The gcc sources are older than those on my system. I've
> got some CFLAGS that the old gcc does not know, eg. -march=pentium-m. Are
> these flags filtered out everything works fine ;-)
Ok, great!
> What are the differences between the cfrontends.tar.gz and the corresponding
> gcc release?
It's a pretty big diff. All of the code for translating to llvm form,
plus minor patches here and there to cause GCC to produce more type-safe
LLVM code (e.g. not lowering address arithmetic etc). Total it's probably
about 15K LOC.
> What would have to be done to get a new version of gcc working as
> frontend?
It's a pretty significant job. You could try to merging in new bits from
GCC mainline, but it's a nasty job: debugging failures requires pretty
strong understanding of how GCC works. Easier would be to patch the
llvm-gcc X86 configuration stuff to accept and ignore that switch.
If it's any consolation, it seems fairly likely that there will be a new
llvm-gcc in development in the next couple of months, based on GCC
mainline.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list