Sunday, 6 October 2013

Re: [gccsdk] -lOSLlib and -static no go

On 06/10/13 14:59, Ron wrote:
> In message <52515DB5.3080307@sky.com>
> Lee Noar <leenoar@sky.com> wrote:
>
>> On 06/10/13 07:01, Ron wrote:
>>> I think my installation of oslib is OK, I used the softfloat GCC version
>>> from the sourceforge site.
>>>
>>> Everything is fine until I try elf2aif on my (working OK) binary.
>>> It reports non static data is present, and when I try adding -static
>>> to the gcc commands it then claims -lOSLib cant be found.
>>> It's as if gcc has worked out libOSLib.a cant be linked staticly.
>>
>> Try -lOSLib32. You're correct that you need to use -static when linking
>> so that elf2aif will work. Why it would find OSLib before -static, but
>> not after, I don't know, but normally, the OSLib library is called
>> libOSLib32.a.
>>
>> Lee.
>>
>
> Sorry, I posted the wrong lib names there.
> And it is libOSLib32.a and -lOSLib32 that I am using, the same one
> that comes with gcc4 softfloat download.
> Now that you've told me that it /should/ be OK with -static, I will
> continue looking for the cause.
> I know that it is linking with -lOSLib32 as I was getting a linking
> error until I put the libOSLib32a inside !SharedLib.libs.lib

You'll also need to use -LOSLib: to tell GCC where the library is;
this assumes that you've double clicked the SetVars obey file that comes
with OSLib.

> I'll have to look closer at my use of -static.

I've tried static linking and elf2aif conversion using both the 4.1.2
and @trunk cross compilers with no errors. I haven't tried the native
compilers though.

Lee.


_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment