[gccsdk] unixlib in 3.4.6r3

John Tytgat John.Tytgat at aaug.net
Sun Feb 6 05:38:29 PST 2011


In message <b4c846a151.beeb at ron1954.woosh.co.nz>
          Ron <beeb at woosh.co.nz> wrote:

> In message <e5671ca151.beeb at ron1954.woosh.co.nz>
>           Ron <beeb at woosh.co.nz> wrote:
> 
> > I have an error that appears to be in unixlib (3.4.6r3).
> > grepping my source doesn't find any unix.h, and I'm having trouble finding
> > which library has included it. The error is:
> >
> > Error: The following symbols could not be found:
> >     'main' referenced in '/home/john/gccsdk/gccsdk_svn4/gcc/arm-riscos-aof/unixlib/apcs32/abs/unixlib/unix/unix.o'
> >
> > Could it be that the function _main() in unix.h can't find it's lib?

No, if you want to create a program (an application), you need to have at
least main() defined.  When you use UnixLib as runtime library, you'll
get this linking error.

When you use SCL as runtime library, you will get a runtime error, unless
you're building a module where main() is optional (when provided, you're
actually creating a 'language' module, cfr PRM's for all details).

> > compiling with -libscl loses the error, but I run into more baffling
> > problems at the linking stage, so Im trying unixlib.
> >
> > TIA Ron M.
> >
> I should mention that I am using the libm from 4.1.1 in 3.4.6.
> Is their a correct libm for 3.4.6r3?

Don't try to mix anything from GCCSDK 4.1.1 with 3.4.6 (and visa versa).
The libraries differ in file format and are not compatible (cfr !GCC's
!Help in GCCSDK 4.1.1 release).

It would help if you could explain what you would like to do (and why you
think the GCCSDK 3.4.6 release would better than the 4.1.1 one).

And to answer your question specifically : the library libm is a library
which on some system contain all the mathematical functions and is created
in GCCSDK 4.1.1 as well but only to ease porting. In reality is it is just
an empty library as all the mathematical functions are in UnixLib (and SCL
stub).  Well, not really empty, only containing two global variables:
<URL:http://www.riscos.info/websvn/filedetails.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Frecipe%2Ffiles%2Fgcc%2Flibunixlib%2Flibm-support%2Flibm.c>.

John.
-- 
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