John Tytgat <[email protected]> wrote:

> In message <[email protected]>
>           Jan-Jaap van der Geer <[email protected]> wrote:

> > On a whole different subject, even though I build the compiler
> > with "./build-it -static riscos", the final result contains ELF
> > files. Had not used shared libraries on RISC OS before, but it
> > looks very neat to me. Strange thing though, using the
> > compiler, I get this warning:

> > *gcc test.c
> > /ADFS::HardDisc4.$/Projects/GCC4/MyOwnBuild/!GCC/bin/ld:
> > warning: libgcc_s.so.1, needed by /GCCSOLib:/libunixlib.so, not
> > found (try using -rpath or -rpath-link)

> > but:

> > *info sharedlibs:lib.libgcc_s/so/1
> > libgcc_s/so/1 WR/R    ELF       22:29:54 12-May-2009  172 Kbytes

> > it seems to be there... Why is this?

> > GCC does not seem to know about -rpath[-link] so I am not sure
> > where the -rpath[-link] should be used.

> You're really sure the gcc you're using is the one you've built ?

Yes. The "test.c" was a small program defining a _main function. I
first doubleclicked the release !GCC, then it gave the error
indicating that _main was defined twice. Then I doubleclicked my
newly build !GCC and compiled again, with the above output.

> As when you use "-static" during the native build, you don't
> produce shared libraries, let alone the produced RISC OS
> compiler/linker is supposed to search for the shared libraries.

> Or, perhaps you did something interesting by first building a
> cross-compiler without -static and use that to build a static
> only native RISC OS compiler. I never did that myself (only used
> static cross-compiler to build a static native compiler; or
> shared/static capable cross-compiler to build a shared/static
> capable native compiler) and this could be a possible build
> problem then.

I am pretty sure (though not quite 100%) that the crosscompiler is
build without -static, but the native compiler is build with
-static. Is this not a good idea?

I tried building without -static first, trying to get something
that looked as much as possible to the release version. But as I
was getting the ELF version, I then tried again with the -static
flag.

Both were ELF versions though. Not sure if the first one had the
same issue though.

I can build both without -static to see if that native compiler
build that way does not have that issue, if that is helpful?

To build a non-ELF compiler I need to build both the crosscompiler
and the native compiler with -static? (There does not seem to be a
good reason to do that, though, if I can get rid of that warning).

Cheers,
Jan-Jaap

_______________________________________________
GCCSDK mailing list [email protected]
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

Reply via email to