This is the mail archive of the
mailing list for the newlib project.
Re: basic questions
- To: Peter Popov <ppopov at redcreek dot com>
- Subject: Re: basic questions
- From: "J. Johnston" <jjohnstn at cygnus dot com>
- Date: Tue, 21 Dec 1999 15:53:01 -0500
- CC: newlib at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <385FC9D5.36C05ABB@redcreek.com>
Peter Popov wrote:
> I've successfully built a powerpc-eabi cross compiler
> including the newlib-1.8.2 release. I've never used
> newlib before and have some rather basic questions
> for which I couldn't find any documentation. After
> building the cross compiler, in the lib directory I ended up
> ads.ld le/ libiberty.a libnosys.a* lin/ sim-crt0.o
> ca/ libads.a libm.a libsim.a mbx.ld yellowknife.ld
> crt0.o libc.a libmbx.a libstdc++.a.2.10.0 mbx.specs
> ldscripts/ libg.a libmvme.a libyk.a nof/
> What I don't understand is why are there some many copies of the
> same libraries? libc.a, for example, is in this directory, plus
> in a whole bunch of other subdirectories:
> #find . -name libc.a
> I understand the "le", little-endian, subdirectory name, but
> not the rest. Any tips would be appreciated. Please respond
> directly since I'm not on the list.
They are not the same libraries. Each is built with different options.
The following options correspond to the directory names:
Where there are multiple subdirectories, there are multiple options.
/nof/le/ca/libc.a is a library built with -msoft-float -mlittle -mcall-aix
The linker will use the appropriate library based on your compile options.
For example, if you build your application with -msoft-float, you don't want the linker
to link in a C library that uses floating point instructions. The linker knows to
use the library out of the nof sub-directory.
-- Jeff Johnston (Cygnus Solutions)