GCC and new libgloss platform

Jacob Bower jab00@doc.ic.ac.uk
Mon Oct 31 18:53:00 GMT 2005

Hi Jeff,

Thanks for your reply.

Since I posted that message I've pretty much figured out most things 
out. You were right that I had to make a slight change to the gcc 
configure script to get it to build libgloss for or32, and it also seems 
that using a modified spec file is the way to go for selecting the 
linker script etc.

Which I guess brings me to a feature request: It would be good if 
libgloss and gcc had some kind of interface to select a default spec 
file from the libgloss machine if it was present. Is there any reason 
why things aren't this way at present?

At any rate I'm quite content with my set-up as is for now. Keep up the 
good work.

Jacob Bower <jab00@doc.ic.ac.uk>
Custom Computing Group  - http://cc.doc.ic.ac.uk/
Department of Computing - http://www.doc.ic.ac.uk/
Imperial College        - http://www.ic.ac.uk/

On Fri, 28 Oct 2005, Jeff Johnston wrote:

> Jacob Bower wrote:
>>  Hi,
>>  I'm working with the OpenRISC (or32) platform, and noticed that there is no
>>  libgloss for entry or32. I've written and gotten working a basic
>>  implementation with a suitable crt0 and i/o stubs which allow minimal
>>  access via the standard OpenRISC UART.
>>  However I can't see how to build gcc using my new libgloss entry.
>>  How do I make gcc pick these up in its install and use them when performing
>>  default linking? Is this possible? or do I have to write my own spec file
>>  and manually put this in.
> Jacob, you need to alter gcc for your configuration to do this.  Post to the 
> gcc list for help on this.  Alternatively, you can put a spec file or .ld file 
> in libgloss and require the user to specify it when compiling (e.g. -Tmy.ld).
>>  I'm using gcc-3.2.3 and newlib-1.13.0, and I've symlinked the newlib/ and
>>  libgloss/ directories into the root of the gcc buildtree. I build gcc,
>>  configured with --with-newlib and --with-libgloss, but after install, I get
>>  libc along with gcc but my crt0, linker script and supporting library are
>>  nowhere to be found.
>>  I based my libgloss entry on the i386 one as this seemed one of the
>>  simplest.
> Remember when you symlink into your gcc "source" tree, the newlib and libgloss 
> subdirectories should be siblings of the gcc subdirectory (i.e. you should 
> have libiberty, gcc, newlib, libgloss, etc... all using the same top-level 
> files of gcc (e.g. config.sub).
> There is no --with-libgloss flag at the moment.  You will need to ensure that 
> either the top-level configuration doesn't nix target-libgloss in your case or 
> else look at adding such a configuration flag.
> If you still run into problems, more information would be helpful.  For 
> example, how you configured and what changes you made to libgloss.
> -- Jeff J.

More information about the Newlib mailing list