This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Building for older systems
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: Michael Eager <eager at eagerm dot com>, "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Sun, 29 Nov 2015 08:34:15 -0800
- Subject: Re: Building for older systems
- Authentication-results: sourceware.org; auth=none
- References: <565B0993 dot 7040202 at eagerm dot com> <565B1383 dot 90104 at redhat dot com>
On Sun, Nov 29, 2015 at 7:02 AM, Carlos O'Donell <carlos@redhat.com> wrote:
> On 11/29/2015 09:20 AM, Michael Eager wrote:
>> Any solutions to building for an older glibc?
>
> There is only one supported way to do what you want.
>
> You need to build against an old sysroot e.g. --sysroot option
> in gcc.
Using --sysroot often requires building your own binutils (because
system/native ld defaults to no sysroot support, or at least did in
the past).
The other ways to achieve "building against old glibc" are obviously
build on an old system, or build in a chroot.
In past life I used to build Linux binaries that would run
*everywhere* by building inside a VM running RedHat 6.2.
--
Paul Pluzhnikov