[adtools] Re: use libgcc.so instead of libgcc_s.so

  • From: Jens Langner <Jens.Langner@xxxxxxxxxxxxxx>
  • To: adtools@xxxxxxxxxxxxx
  • Date: Tue, 08 Jul 2008 11:00:01 +0200

Hello Hans-Joerg,

On Tue, 08 Jul 2008 10:49:01 +0200, Hans-Joerg Frieden wrote:

[...]
>> Perhaps there is a difference between using that option during
>> compilation or during linkage?
>>   
> -shared is a link option that is ignored during compilation.
>
> In General, for libraries: (although I always refer to them as shared 
> objects);
> You need to compile with -fPIC.
> You need to link with -shared.
>
> For programs:
> No additional option during compilation.
> Link with --use-dynld.

Ok, thanks for the clarification.

>> Ok. but when I use only "-use-dynld" during linkage I still get an error
>> about un unresolved symbol against "_Unwind_SjLj_GetIPInfo" in
>> libgcc_eh.a. And as soon as I add "-shared" everything is resolved fine
>> and the binary works as expected.
>
> -shared should not have any influence on copilation, only on linking.

Of course I have added -shared as a link option and not during compilation. So
sorry for the confusion. The problem is that currently (with the new GCC
4.2.4) linking with "-use-dynld" doesn't seem to be enough. I still have to
add "-shared" to the LDFLAGS or the above unresolved symbol error occurs.

>> Well, but as I pointed out, if there is a libgcc.a and libgcc.so it
>> seems that when "-shared" is specified it still links statically against
>> libgcc.a instead of using the shared version of libgcc. So perhaps our
>> renaming of libgcc_s.so to libgcc.so isn't doing so good?!?
>
> Because you need to specify -use-dynld to make it link against shared 
> libraries.

I tried that, of course. But still after having linked the binary with
"-use-dynld -shared" I can see that it used the static libgcc.a instead of
the shared libgcc.so one.

cheers,
jens
-- 
Jens Langner, Dresden/Germany
http://www.jens-langner.de/

Q: How many IBM CPU's does it take to execute a job?
A: Four; three to hold it down, and one to rip its head off.

______________________________________________________________________________
Amiga Development tools ML - //www.freelists.org/list/adtools
Homepage...................: http://www.sourceforge.net/projects/adtools
Listserver help............: mailto:adtools-request@xxxxxxxxxxxxx?Subject=HELP

Other related posts: