This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

19980707 - g77 - Shared objects


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]