Re: wrong bfd recognized

Luca Pizzamiglio
2011-12-21T11:58:44Z

Hi Tom,

After a check, I've noticed that LDFLAGS is set -L/usr/local/lib in
order to use libreadline installed there.
It's possible to have several libreadline installed and LDFLAGS is the
only way to specify which library to use.
On details. FreeBSD could have a libreadline provided by the system
and a libreadline provided by ports (different versions, license,
ecc.)
So, if LDFLAGS is set, then the gdb's libbfd is not used, but the
/usr/local/lib one's.

I'm not totally sure, but I guess that this behavior is not properly correct.
Am I missing some contraindication or a way to point the right libreadline?

thanks in advance for the help

Luca

On Tue, Dec 20, 2011 at 3:56 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Luca" == Luca Pizzamiglio <luca.pizzamiglio@gmail.com> writes:
>
> Luca> I've found a strange situation where gdb's configure script fails to
> Luca> use libbfd and disable ELF support.
> Luca> the problem was that during configuration, the /usr/local/lib/libbfd.a
> Luca> was used, instead of the gdb's one. This library was compiled with
> Luca> libintl support, then the bfd's test program build failed.
>
> Are you adding -L/usr/local/lib to LDFLAGS?
> If so -- why?
>
> Luca> This patch should solve this issue, building bfd's testing program
> Luca> using the gdb's one.
>
> I wonder whether it would break something.
>
> If you can find another spot in the src configury that does it this way,
> I guess I'd be more inclined to just do it.
>
> This needs a ChangeLog entry.
>
> Tom