***[Possible UCE]*** Dynamically linking against GMP and MPFR
Ramana Radhakrishnan
ramana.r@gmail.com
Fri May 25 16:53:00 GMT 2007
On 25 May 2007 07:52:12 -0700, Ian Lance Taylor <iant@google.com> wrote:
> Tim Prince <n8tm@aol.com> writes:
>
> > iant@google.com wrote:
> > > If you
> > > carefully install the appropriate versions of GMP and MPFR on one
> > > machine in the normal way, and build gcc on that machine,
> > > cc1/cc1plus/etc. wind up dynamically linked against libgmp.so and
> > > libmpfr.so. If you then copy the compiler to some other system, or
> > > simply run it from another system via NFS, and you have not carefully
> > > installed the appropriate versions of GMP and MPFR on that other
> > > system, the compiler will fail to start, getting an error from the
> > > dynamic linker.
> >
> > I simply dump the required .so into the lib64 directory of my new gcc
> > installation, and tar up the whole thing. I can untar into my own
> > directory on systems where I have no root access. No doubt others do
> > the same.
Don't seem to have the full thread here, but this is a problem that we
very recently faced while distributing pre-built compilers to a
customer for quick testing.
We instead integrated the correct versions of gmp and mpfr into our
combined tree. Because this is an embedded port we build with
--disable-shared and that allows gmp and mpfr to automatically get
statically linked into the compiler.
>
> I know that there are many ways to handle this but the point is that
> it should work easily and conveniently without extra work.
>
> Ian
>
--
Ramana Radhakrishnan
More information about the Gcc
mailing list