This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
19980707 - g77 - Shared objects
- To: egcs-bugs at cygnus dot com
- Subject: 19980707 - g77 - Shared objects
- From: Edward Maros <emaros at acrux dot caltech dot edu>
- Date: Fri, 10 Jul 1998 08:20:50 -0700 (PDT)
- Reply-To: Edward Maros <emaros at acrux dot caltech dot edu>
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