[llvm-commits] [llvm] r147542 - in /llvm/trunk: autoconf/configure.ac cmake/config-ix.cmake configure include/llvm/Config/config.h.cmake include/llvm/Config/config.h.in include/llvm/Config/llvm-config.h.cmake include/llvm/Config/llvm-config.h.in
Sebastian Pop
spop at codeaurora.org
Thu Jan 5 10:27:24 PST 2012
On Wed, Jan 4, 2012 at 4:06 PM, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> On Wed, Jan 04, 2012 at 03:14:13PM -0600, Sebastian Pop wrote:
>> > Strictly speaking, running e.g. i386-linux on x86_64-netbsd is a
>> > cross-compiler. It can never the less work.
>>
>> I am sorry to not see all the details of your example,
>> could you please give more details? So you have a cross compiler
>> hosted on x86_64-netbsd and targeting i386-linux. When you run
>> LLVM as a JIT you would like it to run on the host x86_64-netbsd, right?
>> Then it also has to produce code for the host x86_64-netbsd, and not
>> for the target i386-linux, as I'm assuming that the include files are
>> different than your host OS.
>
> No, it doesn't have to run code for x86_64-netbsd. I can build the LLVM
> libraries for i386-linux, link it, run it and it will work. Sure, I
> likely have to provide it with Linux compatible header files etc like
> using cross-compilation in general. My point remains that just because I
> am cross-compiling doesn't mean I can't execute JIT code.
Thanks for your explanations: I agree with your comments, and I am
reverting the patch that I committed.
I still seem to have a problem with the definition of what a JIT is:
for me a JIT is a compiler that generates, then executes the code on
the same machine on which the JIT compiler runs. This is the reason
why I was thinking that in the case of a JIT, the compiler should
produce code for the host.
After thinking a bit more about your comment I can see that it is
possible to configure llvm in a cross-compiler setting intentionally
to have the JIT producing code for a target different than the host.
Thanks again for your review,
Sebastian
--
Qualcomm Innovation Center, Inc is a member of Code Aurora Forum
More information about the llvm-commits
mailing list