This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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: AVR: How to locate libbfd to build AVR tool


Thanks Alan!

I think this is just what I needed to know. I believe the following
search order is the best I can reasonably do:

1. if user provides explicit include/lib directories, use those of course
2. else if my packages $exec_prefix/$host/avr has libbfd files I need,
use that
3. else look in path for avr-readelf (i.e. any somewhat arbitrary
binutils program), back up one directory to discover the avr-binutils'
exec_prefix..then use that $avr_exec_prefix/$host/avr if the libbfd
files are found
4. else can't find...print useful message to user to help them solve
the problem

How does that sound? Anyone have a better idea for me? Have I
overlooked any problems with this approach?

Thanks again. Thanks in particular for your patience...I bet if I knew
GNU autotools better I could have found this out on my own. You've
actually answered my direct question and nudged me in the right
direction to solve these kinds of things on my own next time. I do
appreciate your support.

Bill

Alan Modra wrote:

> On Fri, Mar 12, 2004 at 11:59:33PM -0500, Bill wrote:
>
>> I have found that if I "make install_libbfd" from the binutil's
>> bfd build directory, libbfd and bfd.h will be installed in the
>> --prefix directory structure, but I still don't understand how to
>> write my GNU auto-tools scripts to discover where libbfd.a and
>> bfd.h are located. I
>
>
> libbfd is a rather special library, as it is both host and target
> dependent.  By that I mean that libbfd contains code for the host
> to support a particular set of targets, which may or may not
> include the host target.
>
> We used to always install libbfd to $prefix/lib, but that is
> obviously wrong if you are building cross-tools.  You don't want to
> overwrite your native libbfd in $prefix/lib with one for another
> target.  So by default we don't install libbfd unless configuring
> with the same host and target, or when configuring with
> --enable-shared.  You can override this behaviour by configuring
> with --enable-install-libbfd.
>
> The install location is $exec_prefix/$host/$target/lib when host is
>  different from target.  exec_prefix is normally the same as the
> prefix you give configure.
>


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