Re: [gccsdk] -lOSLlib and -static no go
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. ___ 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
Re: [gccsdk] -lOSLlib and -static no go
In message <52515db5.3080...@sky.com> Lee Noar 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 I'll have to look closer at my use of -static. Ron M. ___ 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
Re: [gccsdk] -lOSLlib and -static no go
On 06/10/13 14:59, Ron wrote: In message <52515db5.3080...@sky.com> Lee Noar 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
Re: [gccsdk] -lOSLlib and -static no go
In message <525192b8.7000...@sky.com> Lee Noar wrote: > On 06/10/13 14:59, Ron wrote: > > In message <52515db5.3080...@sky.com> > >Lee Noar 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. > Just using plain libOSLib32.a in the command worked fine with a copy in the source (CSD) directory, so I new it /would/ work once it could be found. I followed up the use of -LOSLib:, and found that I had previously put the supplied OSLib setvars commands in my !GCC.!Run. Once I changed the path to Set OSLib$Path .lib. now -LOSLib: -lOSLib32 works fine with -static Yes, -LOSLib: /is/ needed when static linking, I was lazely thinking that because non-static was finding the lib then all was well. I also started off thinking native gcc defaulted to -static so was slow getting here. Thanks Ron M. ___ 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
Re: [gccsdk] -lOSLlib and -static no go
In message <6f27929653.b...@ron1954.woosh.co.nz> Ron wrote: > Just using plain libOSLib32.a in the command worked fine with a copy > in the source (CSD) directory, so I new it /would/ work once it could > be found. > I followed up the use of -LOSLib:, and found that I had previously > put the supplied OSLib setvars commands in my !GCC.!Run. > > Once I changed the path to > Set OSLib$Path .lib. > now > -LOSLib: -lOSLib32 > works fine with -static > Yes, -LOSLib: /is/ needed when static linking, I was lazely thinking > that because non-static was finding the lib then all was well. > I also started off thinking native gcc defaulted to -static so > was slow getting here. > I now think that putting a lib such as libOSLib.a in SharedLibs is only appropriate if nonstatic output is required. A better place for added libraries seems to be in !GCC.arm-unknown-riscos.lib and then there is no need for -LOSLib: and setvars at all. A nice touch would be to have a !StaticLibs app (Sprite etc) inside !GCC that simply filer_open 's the dir so there is no future confusion to placement and as a reminder to take them forward when renewing !GCC. I think this was the attraction to use !SharedLibs in the first place, (one familiar place for libraries) Libraries are also found in !GCC.libs, but on the same level, !GCC.include is no good for finding oslib/xxx.h so I'm going with !GCC.arm_unknown_riscos. By putting the oslib directory of h/HDR's in !GCC.arm-unknown-riscos.include They are found either with or "oslib/xx.h" and once again, no setvars required. Some oslib .h files reference other oslib files with "oslib/xxh" so it is necessary for that form to work also, but there wont be an error from using either so its a win win. I'm not saying that the packaged method for installing oslib wont work, I just think what I have described will be simpler across the board and there is less to do/go wrong in the Makefile or gcc commands. Cheers Ron M. ___ 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