static linking fails for 4.2(.1) and trunk (4.4.0) with OSX ld/toolchain
SAL Software Developer
developer@sandoe-acoustics.co.uk
Tue May 13 20:57:00 GMT 2008
Hello,
I've built two versions of gfortran:
1/ spliced into apple's gcc-5553 release - (I want to integrate
gfortran with other code and use Xcode).
2/ a straight build from the 4.4.0 trunk as of today.
Both versions fail when I try to link a program statically.
I'm building/running on OSX-10.4.11 on ppc.
The problem I have can be demonstrated with a one line "hello world"
program.
./dst-powerpc/usr/bin/gfortran-4.4.0 -static -nostartfiles
helloi.F90 -o hellof
/usr/bin/ld: /Volumes/SwapScratch/OS-source/gcc-44-build/dst-powerpc/
usr/bin/../lib/gcc/powerpc-apple-darwin8/4.4.0/libgfortran.a
(compile_options.o) incompatible, file contains unsupported type of
section 2 (__TEXT,__picsymbolstub1) in load <<<snip similar lines>>>
/usr/bin/ld: /Volumes/SwapScratch/OS-source/gcc-44-build/dst-powerpc/
usr/bin/../lib/gcc/powerpc-apple-darwin8/4.4.0/libgfortran.a
(transfer.o) incompatible, file contains unsupported type of section
4 (__TEXT,__picsymbolstub1) in load command 0 (must specify "-
dynamic" to be used)
collect2: ld returned 1 exit status
ld -v
Apple Computer, Inc. version cctools-622.9~2
Is this a problem with the apple toolchain (cctools 622.9)... ?
... or is it a problem with MULTILIB builds?
I can see that the multilib build of libgcc attaches -fno-pic to the
static builds - I can't fathom out how to make this happen for
libgfortran.
hope this is the right place to post the question...
Iain
More information about the Fortran
mailing list