[gccsdk] flex & recent !UnixLib, as

Adam lists at snowstone.org.uk
Thu Feb 15 01:37:00 PST 2007

In message <054bbcb44e.Jo at hobbes.bass-software.com>, John Tytgat wrote:

> In message <b279b8b44e.admin at snowstone.org.uk>
>           Adam <lists at snowstone.org.uk> wrote:
> > gcc      -o !RunImage  -Wl,-via @.Sourcery.Via
> > Warning: Attributes of area 'C$$code' in '/home/john/gccsdk/gccsdk_svn/gcc/arm-riscos-aof/gcc-3_4/libgcc/stage2/apcs32/abs/unixlib/divsi3.o' conflict with those in 'o32.flex' 
> >     /home/john/gccsdk/gccsdk_svn/gcc/arm-riscos-aof/gcc-3_4/libgcc/stage2/apcs32/abs/unixlib/divsi3.o:  Code, Read only, 32-bit APCS, Extended FP instructions 
> >     o32.flex:  Code, Read only, 32-bit APCS 
> See below.
> > Error: The following symbols could not be found: 
> >     '_kernel_register_slotextend' referenced in 'o32.flex' 
> > Drlink: Link failed with 1 error 
> > ld fatal error: program /gccpkg:bin/drlink returned exit status 3072:
> > 
> > ...which suggests maybe there's a clash between flex and gcc?
> No this is not a compiler issue but a runtime issue. You are using UnixLib
> as runtime library which does not have all SharedCLibrary _kernel_* calls
> (like _kernel_register_slotextend), let alone that UnixLib is fully
> compatible with binary libraries built with SharedCLibrary headers.
> With other words: you can not use flex (which is a given binary library
> using SharedCLibrary headers) and UnixLib together.  Solution: use the SCL
> runtime library by specifying -mlibscl option in the compile and link line
> used.

Ah, right, thanks. My search of usenet had suggested this as a solution
but I obviously did something wrong when I tried it before (I suspect I
forgot to alter the link line in addition to the compile line). Anyway,
I've done this now and it's all working magically :)

> The linker is a bit too strong in its warnings here (and I have to blame
> myself here as I've made it more pedantic over time). With other words:
> you can ignore this but as soon as you're using SCL as runtime library
> I don't think you will see this warning again.

In fact, the warning still appears here.

> [snip 'as' & UnixLib integrated into !GCC]

Oh, OK.

Thanks for the help :)

Adam Richardson          Carpe Diem

More information about the gcc mailing list