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]
Other format: [Raw text]

RE: Help building basic cross-compiler


Thank you very much for your answer. Would like thank also Franscesco for
his answer :)

Looks like I have to make my own library.

I would like to make it independent because I am validating an RTOS (RTEMS)
and has to be independent of any outside libraries, 
that is, newlib or glibc or uclib cannot be inside the final executable.
Also, the GCC headers should also not be inside the final executable.
Even though we have already done this (checked by readelf of the
executable), a natural question arises: why should we compile newlib if we
are not using it?

So, this is more of a quest to find an elegant solution than a practical
issue.

I think that the GCC versions 3.X allowed to do this, but there is a
floating point bug in GCC (for SPARC) for which there is a patch only for
the version GCC-4.3.3. That's why we wanted to use this version (or higher).

Currently, we are just trying to find which versions we can use and what we
can do to make GCC (and RTEMS) independent of outside libraries.

Thanks again
Manuel Coutinho
Junior Programmer - Space

EDISOFT, S.A. 
Rua Quinta dos Medronheiros - Lazarim 
Apartado 382 Monte de Caparica 
2826-801 Caparica Portugal

 

> -----Original Message-----
> From: Michael Eager [mailto:eager@eagerm.com] 
> Sent: Thursday, April 15, 2010 5:31 PM
> To: Manuel Coutinho
> Cc: gcc-help@gcc.gnu.org
> Subject: Re: Help building basic cross-compiler
> 
> 
> > So when the flag -DL_fixunssfsi is passed to compile libgcc2.c, the 
> > system will try to find the limits.h file which is part of 
> the newlib, 
> > but I don't want newlib.
> 
> You can use glibc, uclibc, or newlib.  Or create your own, naturally.
> 
> > 
> > I've tried several different configurations and versions of GCC. As 
> > far as I know, versions GCC-3.X work, but GCC-4.X don't :(.
> > 
> > My goal is to have the most basic cross-compiler possible, not 
> > dependent on any system or library that will use it. I also 
> would like 
> > not to have to apply a patch to GCC in order to do this.
> 
> The short answer is no.  GCC needs to build libgcc for the 
> target environment, so you need to select which environment 
> it will use.  This is why the routine is looking for limits.h 
> (and likely other include files).
> 
> It might be possible to look through libgcc2.c and see if 
> there are any build options which might avoid most of the 
> uses of headers supplied by one of the libraries.  But you 
> are not likely to find any standard configure triplet which does this.
> 
> Why do you want to build a compiler without specifying the library?
> 
> 
> -- 
> Michael Eager	 eager@eagercon.com
> 1960 Park Blvd., Palo Alto, CA 94306  650-325-8077
> 


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