------- Comment #2 from kargl at gcc dot gnu dot org 2009-09-01 20:58 ------- (In reply to comment #1) > I have just run into this as well; supplying -fPIC (implied in -shared) > without > -fwhole-program works fine, but adding -fwhole-program causes functions that > are called internally to the program being compiled to end up with the wrong > relocation type. Making that function static and providing an > externally_visible wrapper for it is a workaround. >
See http://gcc.gnu.org/ml/fortran/2009-08/msg00466.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40546