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: Peter O'Gorman
Subject: Re: Problem with Fortran shared libraries on OSX/Darwin
Date: Tue, 07 Sep 2004 20:28:35 +0900
User-agent: Mozilla Thunderbird 0.7.3 (Macintosh/20040803)

Peter O'Gorman wrote:


Jeffrey, I don't know if fortran will work when the libs are built -fno-common, I think I heard somewhere that fortran requires common symbols??

Hi again,
I rebuilt g77 on fink with the attached changes. The changes seem to allow working fortran shared libraries on darwin.

Tim, how willing would you be to test this new fortran pacakge with your code?

Jeffrey, I'd like to make this change to the g77 package in fink, is that acceptable to you? The -fno-common flag allows the g77 libs to be used in shared libraries, and the nmedit -p thing makes the global symbols in the static libraries private extern (use nm -m to see the difference between private external and external symbols).

It seems to me that a gcc or gc77 built with --disable-shared has very little chance of successfully creating shared libraries on darwin, I'll ask about that on the gcc list in a minute, perhaps it is simply unsupported???

Peter
--
Peter O'Gorman - http://www.pogma.com
Index: g77.info
===================================================================
RCS file: /cvsroot/fink/dists/10.3/unstable/main/finkinfo/languages/g77.info,v
retrieving revision 1.6
diff -u -3 -p -u -r1.6 g77.info
--- g77.info    10 Jul 2004 20:21:41 -0000      1.6
+++ g77.info    7 Sep 2004 11:26:44 -0000
@@ -1,6 +1,6 @@
 Package: g77
 Version: 3.4.1
-Revision: 1
+Revision: 2
 BuildDependsOnly: true
 Source: mirror:gnu:gcc/gcc-%v/gcc-%v.tar.bz2
 Source-MD5: 31b459062499f9f68d451db9cbf3205c
@@ -18,7 +18,7 @@ CompileScript: <<
  mkdir darwin 
  cd darwin
  ../gcc-%v/configure %c
- make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 
-fno-implicit-templates' profiledbootstrap
+ make CFLAGS='-O -fno-common' LIBCFLAGS='-g -O2 -fno-common' LIBCXXFLAGS='-g 
-O2 -fno-implicit-templates' profiledbootstrap
 #cd gcc; make check-g77
 <<
 InstallScript: <<
@@ -35,6 +35,9 @@ InstallScript: <<
  /bin/rm -f %i/lib/charset.alias
  /bin/rm -f %i/share/info/gcc* %i/share/info/cpp*
  /bin/mv -f %i/lib/libiberty.a %i/lib/libiberty-g77.a
+ for i in `find %i -name "*.a" ` ; do
+       nmedit -p $i
+ done
 <<
 License: GPL
 DocFiles: gcc-%v/gcc/f/ChangeLog gcc-%v/COPYING gcc-%v/COPYING.LIB

reply via email to

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