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: Native libbfd


Matej Kupljen wrote:
Hi

I need native (for MIPS) libbfd.so.
I understand this library is part of binutils and I can
build it using --enable-shared for BINUTILS_EXTRA_CONFIG
in the mips.dat file when using crosstool.
However this lib is built for x86 architecture not for MIPS.

How can I build this for MIPS?
I tried with various options for --host, --build and --target
but did not succeed.


I don't think you need a shared libbfd, static will do.


Once you have a cross toolchain in the path (mipsel-linux-gcc etc.) do from binutils:

configure --build=i686-linux --host=mipsel-linux --target=mipsel-linux --prefix=/usr

make

make DESTDIR=some-temp-dir install

Then copy the libbfd.a and include files into your cross toolchain's sysroot.

You will need the libiberty.a from the same version of binutils that the libbfd.a came from. Be careful with the libiberty.a as many different packages try to install it and if an older version is in the linker search path before the new version, you may see unresolved symbol errors.

David Daney

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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