Linking with -lc not a good idea
I noticed that pltcl.so is now always linked with -lc. That is normally not a
good idea with gcc, because gcc figures out its own order of -lgcc and -lc.
If you specify -lc explicitly, then you override -lgcc.
I think this change
http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/pl/tcl/
Makefile.diff?r1=1.39&r2=1.40
needs to be reconsidered.
Peter Eisentraut <peter_e@gmx.net> writes:
I noticed that pltcl.so is now always linked with -lc. That is normally not a
good idea with gcc, because gcc figures out its own order of -lgcc and -lc.
Since no actual problem has been reported, either in 7.4 or in the
previous releases that had -lc for many platforms, I'm disinclined
to change this in the stable branches. Feel free to take out the -lc
in HEAD, though, and we'll see if anyone complains.
I cannot recall at the moment if -lc was actually needed on Darwin;
if so we could consider adding
SHLIB_LINK += -lc
in Makefile.shlib's darwin case, as is already done for some other
platforms.
regards, tom lane