This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Linking against an specific glibc
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Douglas Gemignani <douglas at gemignani dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 17 Dec 2009 10:11:41 -0800
- Subject: Re: Linking against an specific glibc
- References: <73d571720912171000ia0e1f17xcadd92ae4c7e8c3c@mail.gmail.com>
On Thu, Dec 17, 2009 at 10:00 AM, Douglas Gemignani
<douglas@gemignani.org> wrote:
> Hello,
>
> I would like to know if it is possible to link binaries against old
> versions of glibc. What's the best way to do that?
> If I specify -L to point to my old glibc will be enough? I don't want
> to "install" those old libraries on my machine, so I just compiled the
> old glibc with my current stable gcc and then used the created library
> to link to my binary, but this dosn't work very well.
>
It depends on if you want to use a special gcc or not. You can build
a new gcc with sysroot, which points to your old glibc. If you want to
use the existing gcc, you need a special command line to link against
the old glibc.
--
H.J.