This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

Re: How to include "libbfd" support in cross-gcc setup?



I suppose one way of doing it is to add another build step that starts
with something like

mkdir build-bfd; cd build-bfd
../binutils-*/bfd/configure --target=${cross_target}
--host=${cross_target} --prefix=${sysroot}

Almost right, but two things:


1) If you specify --host and --target, you'll need to specify --build as
well, otherwise configure will assume it's the same as the other two and that
you're trying to do a native build.
OK
2) Don't *ever* refer directly to the configure scripts below top-level. You
/must/ always invoke top level configure. Let it do the recursive stuff. You
don't need to build the whole tree even though you need to run the top-level
configure, you can always specify "make all-target-bfd" on your command line.
Fair enough.

After some trial and error I think I have got this to work. It turns out I have to build "libiberty" as well since parts of bfd depends on it, and also uses functionality not included in the instance of the lib that's packaged with gcc.

Also, I'm wondering if there is a cleaner way to set up the build - I'm now using make targets "all-bfd", "all-libiberty", "install-bfd" and "install-libiberty". It seems to me that it would be better to tell "configure" what components to include, and then use the default make, but I'm unable to figure out how to do that (or if it is possible at all.) I've looked for something like this earlier, too...

But anyhow, I believe I have a setup with a working "cross target" libbfd now.

Thanks.

- Toralf


-- For unsubscribe information see http://sourceware.org/lists.html#faq


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