This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC patch: Add libquadmath - and use it in gfortran (round two)
On Mon, Nov 08, 2010 at 10:20:42PM +0100, Ralf Wildenhues wrote:
> Hello,
>
> * Jack Howarth wrote on Mon, Nov 08, 2010 at 10:14:14PM CET:
> > ...is still passing...
> >
> > -L/Users/howarth/gcc-4.6-20101108/libquadmath
> >
> > which should be...
> >
> > -L/Users/howarth/work/x86_64-apple-darwin10.5.0/i386/libquadmath/.libs
> >
> > for the i386 multilib build and
> >
> > -L/Users/howarth/work/x86_64-apple-darwin10.5.0/libquadmath/.libs
> >
> > for the -m64 multilib build. We need to figure out what construction
> > of variables will provide those properly in each case during the mulilib
> > build of libgfortran.
>
> The key with libtool is usually to *not* pass
> -L../foo/.libs -lfoo
>
> but to pass
> ../foo/libfoo.la
>
> in libbar_la_LIBADD. That will set the paths for linking against
> uninstalled libraries right, and also do TRT when optionally relinking
> at 'make install' time.
>
> Hope that helps, I didn't check for any further details. ;-)
Manually changing the Makefile in /Users/howarth/work/x86_64-apple-darwin10.5.0/libgfortran
and /Users/howarth/work/x86_64-apple-darwin10.5.0/i386/libgfortran from...
libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) -L$(top_srcdir)/../libquadmath LIBQUADLIB -lm $(extra_ldflags_libgfortran) $(version_arg)
to
libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) ../libquadmath/libquadmath.la -lm $(extra_ldflags_libgfortran) $(version_arg)
solves the linkage problems in both cases. Thanks.
Jack
>
> Cheers,
> Ralf