This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-static-libgfortran on {ppc,ppc64,i386,?}-apple-darwin8


Hello,
The -static-libgfortran would be very helpful to us ; however, as of now, it doesn't seem to be effective ... or I don't understand something :-)


on 4-3-branch {ppc, ppc64,i386} - GNU F95 (GCC) version 4.3.1 20080529 (prerelease) (powerpc-apple-darwin8), (i686-apple-darwin8)
and 4-4-trunk {ppc} GNU Fortran (GCC) version 4.4.0 20080529 (experimental) (powerpc-apple-darwin8)


case1:
$ ./dst-powerpc/usr/bin/gfortran-4.3.1 helloi.F90 -o helloif
[Logging for XBS] Used static archive: /Volumes/UFSScratch/GCC/gcc-43- build/dst-powerpc/usr/lib/gcc/powerpc-apple-darwin8/4.3.1/ libgfortranbegin.a
[Logging for XBS] Used dynamic library: /Volumes/UFSScratch/GCC/ gcc-43-build/dst-powerpc/usr/lib/gcc/powerpc-apple-darwin8/4.3.1/ libgfortran.3.dylib
[Logging for XBS] Used dynamic library: /usr/lib/libgcc_s.10.4.dylib
[Logging for XBS] Used dynamic library: /usr/lib/libSystem.B.dylib
[Logging for XBS] Used dynamic library: /usr/lib/system/ libmathCommon.A.dylib


$ ./helloif
 4.3.1:Preprocessed fortran : 10 bananas --->          10 bananas

case2:
$ ./dst-powerpc/usr/bin/gfortran-4.3.1 helloi.F90 -o helloif -static- libgfortran
[Logging for XBS] Used static archive: /Volumes/UFSScratch/GCC/gcc-43- build/dst-powerpc/usr/lib/gcc/powerpc-apple-darwin8/4.3.1/ libgfortranbegin.a
[Logging for XBS] Used dynamic library: /Volumes/UFSScratch/GCC/ gcc-43-build/dst-powerpc/usr/lib/gcc/powerpc-apple-darwin8/4.3.1/ libgfortran.3.dylib
[Logging for XBS] Used dynamic library: /usr/lib/libgcc_s.10.4.dylib
[Logging for XBS] Used dynamic library: /usr/lib/libSystem.B.dylib
[Logging for XBS] Used dynamic library: /usr/lib/system/ libmathCommon.A.dylib


$ otool -L helloif
helloif:
/usr/lib/gcc/powerpc-apple-darwin8/4.3.1/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.11)


doing the same two cases with '-v' : the collect2 lines appear identical (although the COLLECT_GCC_OPTIONS correctly reference the static case) - they are listed below for reference

==== just in case one might assume this is because the "static" version wouldn't work on OSX - I copied libgfortran.a to "libgfortran_static.a" (and ranlib'd)

$ ./dst-powerpc/usr/bin/gfortran-4.3.1 helloi.F90 -o helloif - nodefaultlibs -lgfortranbegin -lgfortran_static -lgcc -lSystemStubs - lSystem
[Logging for XBS] Used static archive: /Volumes/UFSScratch/GCC/gcc-43- build/dst-powerpc/usr/lib/gcc/powerpc-apple-darwin8/4.3.1/ libgfortranbegin.a
[Logging for XBS] Used static archive: /Volumes/UFSScratch/GCC/gcc-43- build/dst-powerpc/usr/lib/gcc/powerpc-apple-darwin8/4.3.1/ libgfortran_static.a
[Logging for XBS] Used static archive: /Volumes/UFSScratch/GCC/gcc-43- build/dst-powerpc/usr/lib/gcc/powerpc-apple-darwin8/4.3.1/libgcc.a
[Logging for XBS] Used dynamic library: /usr/lib/libSystem.B.dylib
[Logging for XBS] Used dynamic library: /usr/lib/system/ libmathCommon.A.dylib


$ ./helloif
 4.3.1:Preprocessed fortran : 10 bananas --->          10 bananas

$ otool -L helloif
helloif:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.11)


----
uname -mrsp : Darwin 8.11.0 Power Macintosh powerpc
machine  : ppc970
----
ttfn
Iain

------
case 1:

/Volumes/UFSScratch/GCC/gcc-43-build/dst-powerpc/usr/bin/../libexec/ gcc/powerpc-apple-darwin8/4.3.1/collect2 -dynamic -arch ppc - macosx_version_min 10.4 -multiply_defined suppress - weak_reference_mismatches non-weak -o helloif -lcrt1.o /Volumes/ UFSScratch/GCC/gcc-43-build/dst-powerpc/usr/bin/../lib/gcc/powerpc- apple-darwin8/4.3.1/crt3.o -L/Volumes/UFSScratch/GCC/gcc-43-build/dst- powerpc/usr/bin/../lib/gcc/powerpc-apple-darwin8/4.3.1 -L/Volumes/ UFSScratch/GCC/gcc-43-build/dst-powerpc/usr/bin/../lib/gcc -L/Volumes/ UFSScratch/GCC/gcc-43-build/dst-powerpc/usr/bin/../lib/gcc/powerpc- apple-darwin8/4.3.1/../../.. /var/tmp//ccAYwfvq.o -lgfortranbegin - lgfortran -lgcc_s.10.4 -lgcc -lSystemStubs -lSystem
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-v' '-o' 'helloif' '- shared-libgcc'


case 2:

/Volumes/UFSScratch/GCC/gcc-43-build/dst-powerpc/usr/bin/../libexec/ gcc/powerpc-apple-darwin8/4.3.1/collect2 -dynamic -arch ppc - macosx_version_min 10.4 -multiply_defined suppress - weak_reference_mismatches non-weak -o helloif -lcrt1.o /Volumes/ UFSScratch/GCC/gcc-43-build/dst-powerpc/usr/bin/../lib/gcc/powerpc- apple-darwin8/4.3.1/crt3.o -L/Volumes/UFSScratch/GCC/gcc-43-build/dst- powerpc/usr/bin/../lib/gcc/powerpc-apple-darwin8/4.3.1 -L/Volumes/ UFSScratch/GCC/gcc-43-build/dst-powerpc/usr/bin/../lib/gcc -L/Volumes/ UFSScratch/GCC/gcc-43-build/dst-powerpc/usr/bin/../lib/gcc/powerpc- apple-darwin8/4.3.1/../../.. /var/tmp//cc4m3u16.o -lgfortranbegin - lgfortran -lgcc_s.10.4 -lgcc -lSystemStubs -lSystem
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-v' '-o' 'helloif' '- static-libgfortran' '-shared-libgcc'
====



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]