Native libbfd

David Daney
Wed Oct 26 15:57:00 GMT 2005

Matej Kupljen wrote:
> Hi
> I need native (for MIPS)
> 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 


make DESTDIR=some-temp-dir install

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

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,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list