This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cross-compiling elfutils and i386_gendis


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

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]