this has come up before on the list, but i'm not looking for support to make it work locally (i can handle that). i'm interested in how to make it work out of the box for people.
the problem: libcpu/ creates a binary named "i386_gendis" which is then executed on the --build system to generate local dis.h headers based on some input files. but when cross-compiling, the code is compiled for the --host, and so executing that binary doesn't work.
further aggravating the problem is that libcpu/ code is also linked in to some of the libraries which are wanted on the --host target. and the gendis binary uses helper libraries outside of its subdir (libeu.a).
Roland is right in that autotools are fairly deficient in mixing --build and --host binaries in a single configure, and their documentation still says the only real way to support this is to run a second configure where --build and --host are the same, and then use the binaries from that in the original build. i'm guessing this solution isn't palpable to the elfutils maintainers in general, so perhaps it goes into the "portable" branch ?
however, it should be fairly easy to mitigate this for the majority of people. those dis.h headers should always be the same once a release is made, so it would make sense to declare them as automake dist targets. that way automake will include them in the release tarball and at build time on the end user's machine, i386_gendis won't even be compiled or needed. this change would simplify things a bit for all builders, not just cross-compiling. and maybe we consider it a "good enough" solution to skip the automatic 2nd configure step ... -mike
It seems reasonable to me that the complex source generation happen only under --enable-maintainer-mode. The *_defs files don't change more often than, say, Makefile.am files, and changing those already requires setting --enable-maintainer-mode. I've put such changes on the new branch roland/maintainer-gendis, and if nobody objects soon I will merge it.
For pedanticism, I still think it would be proper to make the maintainer build cross-friendly. But automake/autoconf makes that enough of a hassle that I'm not bothering with it now.
Thanks, Roland
elfutils-devel@lists.fedorahosted.org