[LLVMdev] Byte code portability (was Re: libstdc++ as bytecode, and compiling C++ to C)

Pertti Kellomäki pk at cs.tut.fi
Wed Nov 22 00:20:07 PST 2006


Chris Lattner wrote:
> On Tue, 21 Nov 2006, Emil Mikulic wrote:
>> LLVMers, given the same endianness and pointersize, can one mix and
>> match LLVM bytecode files produced on different platforms?
> 
> No, not in general.  For example, on the mac, printf it often #defined to 
> printf$ldbl, which doesn't exist on linux.  System headers generally foil 
> the ability to move stuff around like that.

Aside from stuff that depends on system headers, are there any other
dependencies on the host system? In other words, will llvm-gcc produce
exactly the same byte code for a given set of source files regardless of
where compilation takes place? This has obvious implications on
using LLVM as a cross compiler and on how libraries can be distributed.
-- 
Pertti



More information about the llvm-dev mailing list