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]

Re: no joy with 20050723 gcc-4.1 snapshot


I am using MacOS X 10.3.9, sorry for omitting the info.

I have done the following:
(1) reinstalled the "official" Fink gcc4, it gives:

[karma] win/f90% gfortran -v -O3 capacita.f90
Driving: gfortran -v -O3 capacita.f90 -lgfortranbegin -lgfortran -shared-libgcc
Using built-in specs.
Target: powerpc-apple-darwin7
Configured with: ../configure --prefix=/sw --prefix=/sw/lib/gcc4 --enable-languages=c,c++,f95,objc,java --infodir=/share/info --with-gmp=/sw --with-included-gettext --host=powerpc-apple-darwin7 --with-as=/sw/lib/odcctools/bin/as --with-ld=/sw/lib/odcctools/bin/ld
Thread model: posix
gcc version 4.0.1
 /sw/lib/gcc4/libexec/gcc/powerpc-apple-darwin7/4.0.1/f951 capacita.f90 -fPIC -quiet -dumpbase capacita.f90 -auxbase capacita -O3 -version -o /var/tmp//cc54M4on.s
GNU F95 version 4.0.1 (powerpc-apple-darwin7)
        compiled by GNU C version 3.3 20030304 (Apple Computer, Inc. build 1671).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 /sw/lib/odcctools/bin/as -arch ppc -o /var/tmp//ccgpLkLW.o /var/tmp//cc54M4on.s
 /sw/lib/gcc4/libexec/gcc/powerpc-apple-darwin7/4.0.1/collect2 -dynamic -arch ppc -weak_reference_mismatches non-weak -o a.out -lcrt1.o /sw/lib/gcc4/lib/gcc/powerpc-apple-darwin7/4.0.1/crt2.o -L/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin7/4.0.1 -L/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin7/4.0.1/../../.. /var/tmp//ccgpLkLW.o -lgfortranbegin -lgfortran -lgcc_s -lgcc -lSystem -lmx

(2) reinstalled my 4.1 build, it gives:

[karma] win/f90% gfortran -v -O3 capacita.f90
Driving: gfortran -v -O3 capacita.f90 -lgfortranbegin -lgfortran -shared-libgcc
Using built-in specs.
Target: powerpc-apple-darwin7
Configured with: ../configure --prefix=/sw --prefix=/sw/lib/gcc4 --enable-languages=c,c++,f95,objc,java --infodir=/share/info --with-gmp=/sw --with-included-gettext --host=powerpc-apple-darwin7 --with-as=/sw/lib/odcctools/bin/as --with-ld=/sw/lib/odcctools/bin/ld
Thread model: posix
gcc version 4.1.0 20050723 (experimental)
 /sw/lib/gcc4/libexec/gcc/powerpc-apple-darwin7/4.1.0/f951 capacita.f90 -fPIC -quiet -dumpbase capacita.f90 -auxbase capacita -O3 -version -o /var/tmp//ccKMRpsQ.s
GNU F95 version 4.1.0 20050723 (experimental) (powerpc-apple-darwin7)
        compiled by GNU C version 3.3 20030304 (Apple Computer, Inc. build 1671).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
 /sw/lib/odcctools/bin/as -arch ppc -o /var/tmp//cclH0loT.o /var/tmp//ccKMRpsQ.s
 /sw/lib/gcc4/libexec/gcc/powerpc-apple-darwin7/4.1.0/collect2 -dynamic -arch ppc -weak_reference_mismatches non-weak -o a.out -lcrt1.o /sw/lib/gcc4/lib/gcc/powerpc-apple-darwin7/4.1.0/crt2.o -L/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin7/4.1.0 -L/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin7/4.1.0/../../.. /var/tmp//cclH0loT.o -lgfortranbegin -lgfortran -lgcc_s -lgcc -lmx -lSystem
/sw/lib/odcctools/bin/ld: warning multiple definitions of symbol _cacoshf
/usr/lib/libmx.dylib(single module) definition of _cacoshf
/usr/lib/libSystem.dylib(complex.o) definition of _cacoshf
/sw/lib/odcctools/bin/ld: warning multiple definitions of symbol _cargf
/usr/lib/libmx.dylib(single module) definition of _cargf
/usr/lib/libSystem.dylib(complex.o) definition of _cargf
...

Looking at the differences, I found "-lSystem -lmx" in (1) and
"-lmx -lSystem" in (2).

So still using gcc4.1 I did:

[karma] win/f90% gfortran -v -c -O3 capacita.f90
Using built-in specs.
Target: powerpc-apple-darwin7
Configured with: ../configure --prefix=/sw --prefix=/sw/lib/gcc4 --enable-languages=c,c++,f95,objc,java --infodir=/share/info --with-gmp=/sw --with-included-gettext --host=powerpc-apple-darwin7 --with-as=/sw/lib/odcctools/bin/as --with-ld=/sw/lib/odcctools/bin/ld
Thread model: posix
gcc version 4.1.0 20050723 (experimental)
 /sw/lib/gcc4/libexec/gcc/powerpc-apple-darwin7/4.1.0/f951 capacita.f90 -fPIC -quiet -dumpbase capacita.f90 -auxbase capacita -O3 -version -o /var/tmp//ccsFX9mV.s
GNU F95 version 4.1.0 20050723 (experimental) (powerpc-apple-darwin7)
        compiled by GNU C version 3.3 20030304 (Apple Computer, Inc. build 1671).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
 /sw/lib/odcctools/bin/as -arch ppc -o capacita.o /var/tmp//ccsFX9mV.s
[karma] win/f90% rm a.out
remove a.out? y
[karma] win/f90% /sw/lib/gcc4/libexec/gcc/powerpc-apple-darwin7/4.1.0/collect2 -dynamic -arch ppc -weak_reference_mismatches non-weak -o a.out -lcrt1.o /sw/lib/gcc4/lib/gcc/powerpc-apple-darwin7/4.1.0/crt2.o -L/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin7/4.1.0 -L/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin7/4.1.0/../../.. capacita.o -lgfortranbegin -lgfortran -lgcc_s -lgcc -lSystem -lmx
[karma] win/f90% ll a.out                                                                                                                   -rwxr-xr-x    1 dominiq  staff       38592 Jul 28 16:20 a.out*

Bingo!

Apparently the order of -lSystem and -lmx matters, the order in (1)
preventing the warnings.

So 
Question 1: why some builds use the right order (1) and some others
(2) (apparently the situation with 10.3 is the reverse of 10.4)?
Question 2: what to do to enforce the right order? 
Question 3 (to be less ignorant) why does the order matter?

Cheers

Dominique


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