19980707 - g77 - Shared objects
Edward Maros
emaros@acrux.caltech.edu
Fri Jul 10 08:19:00 GMT 1998
I need to create a shared object which uses the fortran library. With the
standard configuration, I get error messages like:
Text relocation remains referenced
against symbol offset in file
pow 0x8
/home/emaros/share/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.90.29/libf2c.a(pow_dd
.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
in the linking process. In my version, I did:
make mostlyclean in egcs-19980707/sparc-sun-solaris2.6/libf2c
and edited the egcs-19980707/Makefile adding the -fpic option to both CFLAGS and
CXXFLAGS. This solves the problem. Is there a way to make this the default
behavior when configuring the system with the --enable-shared option? Or would
it be better to create a shared object version of the f2c (g2c) library
(libg2c.so) which is installed in the lib directory instead of in the system
specific directory? Is there reason that this library isn't regaurded like
stdc++?
Thanks,
Ed
------
Edward Maros emaros@ligo.caltech.ed
More information about the Gcc-bugs
mailing list