This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


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

RE: problems compiling 2.95.3


Thanks David for this information,

i understand the process you explain here, and it sounds interesting cause i 
also have problems with crt0.o...

but what i would like to know now is :
How do i configure and make newlib?
I mean what is the target i should use?
I need to build crossdevelopment tools (binutils, gcc, insight) for an arm 
platform. so i used --target=arm-elf
but configure says that this type of configuration is not supported in the 
following directories : target-libgloss

Thanks for any explanation (i've been searching on the net for that, but i 
couldn't find it)

PS : just an idea : wouldn't it be usefull to create a page where we could 
find how to build the required crossdev tools? (i mean at least for the most 
used platform such as arm ones...)


>From: David Korn <dkorn@pixelpower.com>
>To: 'Nick Papadonis' <npapadon@yahoo.com>, Alexandre Oliva  
><aoliva@redhat.com>
>CC: gcc-help@gcc.gnu.org
>Subject: RE: problems compiling 2.95.3
>Date: Fri, 27 Apr 2001 12:32:45 +0100
>
> >-----Original Message-----
> >From: Nick Papadonis [mailto:npapadon@yahoo.com]
> >Sent: 26 April 2001 03:33
>
>
> >Ok.  I copied the newlib headers to $(gcc_src_prefix)/include.
> >Everything starts compiling (because things point to the right
> >headers) then I get another error.  I think it's because
> >there should be an -I argument with this directory passed.  Is this a
> >build problem.
>
>   Don't do it like that.  Copying those include files into the gcc
>source has confused the build process.  You said in an earlier mail that
>you'd been making hacks to the search paths, and you probably don't want
>to do that either.
>
>   Instead, you want to have the gcc-2.95.3 and the newlib-1.9.0 top level
>source code directories side-by side in a dir somewhere.  I'd start again
>with fresh unpacks of the tar file if I were you.  I generally put my
>build dirs in the same tree as well, but they could be anywhere.
>
>.../src/
>      |
>      +- gcc-2.95.3/
>      +- newlib-1.9.0/
>      +- gcc-build/
>      +- newlib-build/
>
>then cd into gcc-2.95.3 and create a couple of soft links
>
>     cd .../src/gcc-2.95.3
>     ln -s ../newlib-1.9.0/newlib newlib
>     ln -s ../newlib-1.9.0/libgloss libgloss
>
>   Now you have to make and install gcc in two passes.  This solves the
>missing crt0.o problem.  The problem is that before you can build fully
>executable programs with the cross compiler, you have to have a working
>C library, which is where crt0.o comes from.  But before you can build
>the C library, you have to have a working compiler!  Fortunately, that's
>not quite true: you can make a half-working compiler, with no libs, that
>is good enough for compiling the C lib.  The only thing is, this half-
>built compiler *isn't* good enough for building libstdc++, and that's
>why your build was going wrong previously:  at the point where it wants
>to start building libstdc++, it needs to have a fully working compiler.
>
>   OK, so how do we make this half-working compiler ?   Simple enough:
>we just tell the compiler to build a C-only compiler.  That's it!  So
>the procedure overall looks something like
>
>  - unpack source code
>  - configure, build and install the cross binutils
>      (you've probably got this far OK)
>  - make soft links in gcc top level source dir
>  - change into gcc-build dir
>  - configure gcc with option --enable-languages=c (as well as any others
>      you've been using)
>  - give the command "make LANGUAGES=c all install"
>  - cd into newlib build dir
>  - configure, build and install newlib
>  - cd back to gcc-build dir
>  - reconfigure gcc, this time without the --enable-languages option (but
>      still with all your other options)
>  - finish off by giving the command "make all install"
>
>        DaveK
>--

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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