[gccsdk] Problems building crosscompiler

John Tytgat John.Tytgat at aaug.net
Sun Nov 8 17:30:12 PST 2009

In message <mpro.kstgn305m9dmo03d4.lists at stevefryatt.org.uk>
          Steve Fryatt <lists at stevefryatt.org.uk> wrote:

> Peter Naulls <peter at chocky.org> wrote:
> > A simple Makefile might therefore look like this:
> > 
> > 
> > CFLAGS  = -I $(GCCSDK_INSTALL_ENV)/include
> etc.
> OK, that all seems to work, and it's a lot neater than having to use the
> riscos user -- thanks for the help.
> It now falls over on linking, with "file not recognized: File format not
> recognized" on the old OSLib32.o library.  I assume this to simply be AOF vs
> ELF, in which case I'll return to it another day.

You need OSLib 7 but that hasn't been released yet.  An older set
of binaries can be found at <URL:http://joty.drobe.co.uk/oslib/>, if you
use UnixLib as runtime library, take the softfloat one; if you use
SharedUnixLibrary in your program, take the 'module' one (SCL build & SCL
for module build should be the same for OSLib).

> Is there a guide anywhere online to the changes with ELF?  From what I can
> tell with Google, GCC V4 only works with ELF format binaries.

Have a look at gcc4/riscos/dist/!GCC/docs/index.html which is the
main page of !GCC documentation for the RISC OS build of gcc. It points
to other documentation which is created during the build so not all
links there will work from that document.

> Is this
> correct, or can it still output an AIF executable if asked to (as far as I
> can see, it can not accept AOF libraries any more)?

AIF does not imply AOF or visa versa.  Yes AIF binaries are possible,
cfr above mentioned documentation and the elf2aif binary.  Be sure to
specify the -static option when linking and you want AIF executable
using elf2aif as the documentation has not been updated enough for the
shared library building which is currently the default for the

> This was the other
> issue I was hoping to avoid by sticking with V3 for the time being, as it
> looks like most things like OSLib are still in a "DIY-ELF" state.

It would indeed nice to have OSLib 7 release, one of many items on my
todo/wouldbenicetohave list. :-/

John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven

More information about the gcc mailing list