On 31.10.2011, at 12:16, Riku Voipio <riku.voi...@iki.fi> wrote: > On Sat, Oct 29, 2011 at 08:08:39PM +0200, Alexander Graf wrote: >>> When using qemu's linux-user binaries through binfmt, argv[0] gets lost >>> along the execution because qemu only gets passed in the full file name >>> to the executable while argv[0] can be something completely different. >>> >>> This breaks in some subtile situations, such as the grep and make test >>> suites. >>> >>> This patch adds a wrapper binary called qemu-$TARGET-binfmt that can be >>> used with binfmt's P flag which passes the full path _and_ argv[0] to >>> the binfmt handler. >>> >>> The binary would be smart enough to be versatile and only exist in the >>> system once, creating the qemu binary path names from its own argv[0]. >>> However, this seemed like it didn't fit the make system too well, so >>> we're currently creating a new binary for each target archictecture. >>> >>> CC: Reinhard Max <m...@suse.de> >>> Signed-off-by: Alexander Graf <ag...@suse.de> > >> Ping? > > Last time a wrapper for binfmt was suggested on this list, it was shot down > since people didn't want to add extra binary to the chroot. But your point > is valid, without proper argv[0] things break sometimes. For the same reason > scratchbox has a wrapper binary instead of calling qemu directly...
Yup. And I really don't want to have downstreams diverge because we're not pragmatic enough :). Alex >