Waldek Hebisch wrote:
AFAIKS Darwin backend is doing something very strange when inlining Pascal initialization routines (tries to call them like external ones).
Do you think we should report this to the gcc list ?
If problem is limited to initialization (as a little experiment suggest), then the following patch is w good workaround. It forbids inlining initialization routines -- such inlining is useless anyway.
Thanks for the patch. It does solve the problem.
By the way, after building and installing I have to run ranlib on libgpc.a.
[G4:~/gnu/testgpc/adriaan] adriaan% gpc hello.pas /usr/bin/ld: table of contents for archive: /Developer/Pascal/gpc340d2/lib/gcc/powerpc-apple-darwin/3.4.0/libgpc.a is out of date; rerun ranlib(1) (can't load from it) collect2: ld returned 1 exit status [G4:~/gnu/testgpc/adriaan] adriaan% ranlib /Developer/Pascal/gpc340d2/lib/gcc/powerpc-apple-darwin/3.4.0/libgpc.a [G4:~/gnu/testgpc/adriaan] adriaan% gpc hello.pas [G4:~/gnu/testgpc/adriaan] adriaan% gpc -O3 hello.pas [G4:~/gnu/testgpc/adriaan] adriaan% gpc -g -O3 hello.pas
I am now running the testsuite to see if there are any more problems.
Regards,
Adriaan van Os