bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with Fortran shared libraries on OSX/Darwin


From: Tim Jenness
Subject: Re: Problem with Fortran shared libraries on OSX/Darwin
Date: Thu, 2 Sep 2004 18:34:32 -1000 (HST)

On Fri, 3 Sep 2004, Peter O'Gorman wrote:

> 
> I don't believe that you'll get working executables this way.
> 

Except it all works fine. I'm not building executables with that patch,
I'm just building the libraries. Executables include their own libgcc.a
during the link phase. With the above patch I can build shared libraries
that can link into exectuables (this is with 3 million lines of fortran so
it's not a small project). Saying that, I'm happy to find out that I was
fluking a fix that wasn't correct.

I note that g++ seems to have the -nostdlib option for darwin 
though (that's what gave me the idea).

> The problem is actually the -single_module flag. It is needed to make c++ 
> static constructors work better on darwin up to 7.x. The reason it fails on 
> g77 (and on fsf gcc actually) is that Apple's gcc uses __private_extern__ 
> symbols in libgcc and libstdc++. __private_extern__ symbols are magic, they 
> are available in the static archive to resolve undefined symbols until they 
> are linked whereupon they turn into local symbols. Fink's f77 libs don't 
> have that magic.
> 

Thanks.

> Anyway, I'll fix the darwin commands to work with fsf gcc before 
> libtool-2.0. Thanks for the report, I keep forgetting about this bug.
> 

That's great. I can live with my hack and I await libtool 2.0. (I'll keep 
an eye on the dev track for your patch).

Thanks

-- 
Tim Jenness
JAC software
http://www.jach.hawaii.edu/~timj





reply via email to

[Prev in Thread] Current Thread [Next in Thread]