[LLVMdev] LLVM and newlib progress

Reid Spencer rspencer at reidspencer.com
Thu Nov 9 10:16:10 PST 2006


Hi Pertti,

On Thu, 2006-11-09 at 19:33 +0200, Pertti Kellomäki wrote:
> Reid Spencer kirjoitti:
> > So, now I'm not sure what you're talking about. Is
> > libgloss part of newlib? If so, please note that it is not llvm-gcc's
> > job to pass CFLAGS down. That would be a bug in the newlib makefiles. :)
> 
> Sorry for being obtuse. Yes, if there indeed is a bug, it is in the
> newlib build system. I was trying to compile newlib with llvm-gcc.

Okay, that makes sense now ;)

> The need for propagating compiler flags arises because if I want to
> create newlib libraries that contain LLVM byte code rather than host
> object files, I need to pass -emit-llvm to all invocations of llvm-gcc.

That is something that your build system should be doing, not llvm-gcc.
Unfortunately, I don't know newlib at all so I can't help you there. It
should be as simple as:

CC=llvm-gcc -emit-llvm

somewhere in the makefile. Or, try invoking make this way:

make CC="llvm-gcc -emit-llvm"

> Hope this clarifies a bit.

Yup, it did :)

Reid.




More information about the llvm-dev mailing list