Why does the build system override bfd/opcodes host libs via LD_LIBRARY_PATH?

Thiemo Seufer ths@networkno.de
Fri Apr 4 17:45:00 GMT 2008


Hello All,

I see a funny effect when building binutils native on Debian
unstable/mips:

The host /usr/bin/ar segfaults because
 1) it is a dynamic executable which needs libbfd.so
 2) the build system provides a freshly built (and ABI incompatible)
    via LD_LIBRARY_PATH.

The library path override comes from RPATH_ENVVAR, which ultimately
stems from a lib_path definition in the toplevel Makefile.def:

[...]
host_modules= { module= bfd; lib_path=.libs; bootstrap=true; };
host_modules= { module= opcodes; lib_path=.libs; bootstrap=true; };
[...]

However, the users of those libraries are AFAICS careful to get the
paths right, which suggests meddling with the environment isn't needed
in that case.

Did I miss something, or is removing those two lib_path statements the
right solution?

gmp and mpfr are two more host libraries which define a lib_path, but
they require --disable-shared, which avoids the problem.


Thiemo



More information about the Binutils mailing list