[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] Using qemu-arm as an interpreter
From: |
Dave Flogeras |
Subject: |
Re: [Qemu-discuss] Using qemu-arm as an interpreter |
Date: |
Thu, 14 May 2015 12:08:27 -0300 |
On Thu, May 14, 2015 at 9:40 AM, Peter Maydell <address@hidden> wrote:
> You probably have some symlinks or similar in the glibc sysroot.
> The QEMU -L option isn't really intended to deal with anything
> more than a very simple sysroot with a minimal set of libraries,
> no circular symlinks, etc. It has at least one bug where it will
> go into an infinite loop if the directory structure confuses it.
>
> If the directory looks anything like a full system install then
> chrooting into it will work better.
Hi Peter, thanks for the info. You're right, I am being lazy and
pointing it at a sysroot that is an entire system (in fact I do chroot
into it for other reasons). However, it is useful to me to run my
automated regressions outside of the chroot. I think I can do it with
the following changes (in case this helps anyone else):
qemu-arm -L /path/to/my/cross-compiled-glibc ./my_binary
However that only works for C programs, not linked to anything other
than glibc and friends. For C++ I could build statically, but that is
undesirable and also still doesn't scale if I link to any other
libraries. It seems that qemu-arm obeys LD_LIBRARY_PATH as well, so
something like the following works seemingly fine:
LD_LIBRARY_PATH=/path/to/cross-gcc/runtime:/path/to/other/sysroot/libs
qemu-arm -L /path/to/bare/cross-environment ./my_program
Now it's time to integrate that into my automated build system without
making it too brittle :)
Thanks,
Dave