Anton Korobeynikov
2006-Nov-23 21:37 UTC
[LLVMdev] Byte code portability (was Re: libstdc++ as bytecode, and compiling C++ to C)
Hello Philipp,> Does that mean that I will have to configure llvm as a cross-compiler > even when using the C backend?Not llvm, but llvm-gcc only. I've successfully used llvm-gcc for crosscompiling with host=linux and target=mingw32 platform. So, you have just to supply host, build and target triples to llvm-gcc configure and be also sure, that configure will find target headers, libraries and binutils (e.g. for mingw32 I'm copying mingw32 runtime, cross-binutils & libraries to build directory). -- WBR, Anton Korobeynikov
Philipp Klaus Krause
2006-Nov-24 19:12 UTC
[LLVMdev] Byte code portability (was Re: libstdc++ as bytecode, and compiling C++ to C)
Anton Korobeynikov schrieb:> Hello Philipp, > >> Does that mean that I will have to configure llvm as a cross-compiler >> even when using the C backend? > Not llvm, but llvm-gcc only. I've successfully used llvm-gcc for > crosscompiling with host=linux and target=mingw32 platform. > > So, you have just to supply host, build and target triples to llvm-gcc > configure and be also sure, that configure will find target headers, > libraries and binutils (e.g. for mingw32 I'm copying mingw32 runtime, > cross-binutils & libraries to build directory).Why does it need target libraries and binutils? Can't I just Compile my C++ code to C code (maybe using a template-only libstdc++, so I won't have to link it) and then compile the resulting C code with sdcc and link it to C libraries compiled directly with sdcc. I don't want to pass my C libraries through LLVM since LLVM makes the code more inefficient and they're partially written in assembler. Philipp
Seemingly Similar Threads
- [LLVMdev] Byte code portability (was Re: libstdc++ as bytecode, and compiling C++ to C)
- [LLVMdev] Byte code portability (was Re: libstdc++ as bytecode, and compiling C++ to C)
- [LLVMdev] Byte code portability (was Re: libstdc++ as bytecode, and compiling C++ to C)
- [LLVMdev] Byte code portability (was Re: libstdc++ as bytecode, and compiling C++ to C)
- [LLVMdev] Byte code portability (was Re: libstdc++ as bytecode, and compiling C++ to C)