[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] avr-gcc, libgcc.a and libgcov.a
From: |
Chris Marrin |
Subject: |
Re: [avr-libc-dev] avr-gcc, libgcc.a and libgcov.a |
Date: |
Wed, 04 May 2011 22:20:39 -0700 |
On May 4, 2011, at 7:57 PM, Weddington, Eric wrote:
>
>
>> -----Original Message-----
>> From: Chris Marrin [mailto:address@hidden
>> Sent: Wednesday, May 04, 2011 7:21 PM
>> To: Weddington, Eric
>> Cc: address@hidden
>> Subject: Re: [avr-libc-dev] avr-gcc, libgcc.a and libgcov.a
>>
>>
>> Yes, it is very helpful. One other question is what is the purpose of
>> libiberty.a? It's in the path lib/ which seems very odd if it's an AVR
>> specific library. Is it just there to allow building the tools? Can I
>> ignore it?
>
> Libiberty is a library that comes with GCC (though it can be it's own
> separate library) that has common functionality across multiple platforms,
> including various Linux flavors and Windows. It's known as a "compatability"
> library. It's mainly used in building GCC itself for whatever host is
> specified.
>
> The reason for the weird name has to do with library names and what GCC
> searches for. GCC uses the -l switch to specify the name of the library to
> link in. However the library name must be in the form of "lib<name>.a". So,
> for example, on the linking command line you will see "-lc" given to GCC.
> This means that GCC will search for the filename "libc.a", which happens to
> usually be the Standard C library for the target compiled for. Well since the
> filename of the library is "libiberty.a", this means that the linker switch
> to find the file must be: -liberty, i.e. 'freedom' from the host system's
> idiosyncrasies. Get it? ;-)
Yes, programmers in the early days sure were "funny" :-)
I have found that it's actually binutils that installs it. Since it is an i386
library I won't worry about adding it to the install.
Thanks
-----
~Chris
address@hidden
- [avr-libc-dev] avr-gcc, libgcc.a and libgcov.a, Chris Marrin, 2011/05/04
- Re: [avr-libc-dev] avr-gcc, libgcc.a and libgcov.a, Weddington, Eric, 2011/05/04
- Re: [avr-libc-dev] avr-gcc, libgcc.a and libgcov.a, Chris Marrin, 2011/05/04
- Re: [avr-libc-dev] avr-gcc, libgcc.a and libgcov.a, Weddington, Eric, 2011/05/04
- Re: [avr-libc-dev] avr-gcc, libgcc.a and libgcov.a, Chris Marrin, 2011/05/04
- Re: [avr-libc-dev] avr-gcc, libgcc.a and libgcov.a, Chris Marrin, 2011/05/04
- Re: [avr-libc-dev] avr-gcc, libgcc.a and libgcov.a, Weddington, Eric, 2011/05/04
- Re: [avr-libc-dev] avr-gcc, libgcc.a and libgcov.a,
Chris Marrin <=
- Re: [avr-libc-dev] avr-gcc, libgcc.a and libgcov.a, Chris Marrin, 2011/05/06