Compiling with newlib headers?

Joel Sherrill
Sat Sep 30 14:43:00 GMT 2000

Chris Faylor wrote:
> On Sat, Sep 30, 2000 at 06:40:06PM +0400, Sergei Organov wrote:
> >The article is wonderful, but the following question still remains. How do I
> >merge trees taken from, let's say, gcc-2.95.2, binutils-2.10, and newlib-1.8.2
> >distributions together? What to do with 'include' and 'libiberty' directories
> >in this case? Take them from the latest distribution, or what?
> >
> >Actually, I took everything from binutils, then 'gcc' directory from gcc, then
> >'newlib' directory from newlib. This seems to work, but is it the right thing
> >to do?
> There is no "right thing to do", unfortunately.  The releases of gcc, gdb, newlib,
> and binutils are disjoint.  That means that the bfd directory from a gcc release
> is only guaranteed to work correctly with gcc.  The include directory from a gdb
> release is only guaranteed to work correctly with gdb, etc.
> You can probably get away with using the newest version of common libraries and
> include files but there are no guarantees.

Exactly.  Years of practice have lead me to believe the right thing to
do is :

  build and install binutils
  make sure cross binutils are in PATH
  put newlib under the gcc tree and build them together
  build and install gdb

We used to build binutils, gcc, and newlib at the same time.  Even 
keeping the top level configury in sync for those was a pain.
> cgf

Joel Sherrill, Ph.D.             Director of Research & Development                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

More information about the Newlib mailing list