This is the mail archive of the gcc-patches@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]

Re: [Fortran - trunk, committed] Make libf2c a shared library.


On Oct  1, 2001, Toon Moene <toon@moene.indiv.nluug.nl> wrote:

> Alexandre Oliva wrote:
> [ ... on .lo being the target of compilation in Makefile.in vs. .o ... ]

>> Nope, the Makefile dependencies would still be wrong, and would
>> trigger at the wrong times.  Unless I'm mis-reading it.
>> 
>> Remember that, if you configure --disable-static, libtool *won't*
>> create the .o files, only the .lo object-abstraction files and the PIC
>> object files inside .libs.  So you want Makefile dependencies on .lo,
>> not .o.

> Do you think the following patch (attached) is the right approach ?

Yup, but see below.

> ./a.out: error in loading shared libraries: /usr/snp/lib/libg2c.so.0:
> undefined symbol: __dso_handle

This is a symptom of a bug in binutils.  Time to upgrade it :-)

> 	* libF77/Makefile.in: Make .lo the target of compilation.
> 	* libI77/Makefile.in: Ditto.
> 	* libU77/Makefile.in: Ditto.


> *** 84,88 ****
>   objlist:
>   	objs="`cat ../objlist`" ; for i in $(OBJS) ; do \
> ! 	   x=`echo $$i | sed -e "s/\.o$$/.lo/g"` ;\
>   	   objs="$$objs libF77/$$x" ;\
>   	done ; \
> --- 84,88 ----
>   objlist:
>   	objs="`cat ../objlist`" ; for i in $(OBJS) ; do \
> ! 	   x=`echo $$i` ;\
>   	   objs="$$objs libF77/$$x" ;\
>   	done ; \

Err...  How about:

        objs="`cat ../objlist`" ; for x in $(OBJS) ; do \
           objs="$$objs libF77/$$x" ; \
        done ; \

(on all 3 Makefile.ins)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


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