You shouldn't be running ld directly, except in very special cases and you
need to know all the details how you should invoke ld yourself.
In all other cases, gcc driver should be used instead.
So in the above case
gcc -m64 -r -o SUBSYS.o localtime.o strftime.o pgtz.o
That will take care of passing -m elf64ppc among other needed things.

Thanks for your reply Jakub.
The PostgreSQL build scripts did choose calling ld directly since i can
remember, i cannot believe that this behavior is that wrong. Many platforms
out there aren't broken regarding this (even when using biarch build
environments)
However, trying your suggestion gives:
gcc4 -m64 -r -o SUBSYS.o localtime.o strftime.o pgtz.o
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
The libgcc_s.so seems to be present on the system, however, gcc4 isn't able
to locate them? Maybe missing dependencies, but libgcc is installed.
Ah, and using gcc 3.4.6 on this platform gives a slightly different message:
/usr/bin/ld: cannot find -lgcc_s_64
collect2: ld returned 1 exit status

Note

You need to
log in
before you can comment on or make changes to this bug.