This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Fwd: Compiling pgm for an older linux version - cross compiler
- From: Ian Lance Taylor <iant at google dot com>
- To: Jacques Greindl <jgreindl at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 20 Jan 2011 10:32:39 -0800
- Subject: Re: Fwd: Compiling pgm for an older linux version - cross compiler
- References: <AANLkTinSbxUb2DZq91rWkwk51Hix2gRUOS5-gGL96WGM@mail.gmail.com> <AANLkTimBCUxm6HtRzvWfi7=gB4_odn44WOU45pr+hJht@mail.gmail.com>
Jacques Greindl <jgreindl@gmail.com> writes:
> This is probably a newby question but I can't find the anwser ...
>
> I have 2 files : a.new & a.old
> a.new : compiled today
> a.old : compiled some years ago, on another system
>
> jack@cixci:/$ file a.new
> a.new: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
> dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not
> stripped
> jack@cixci:/$ file a.old
> a.old: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
> dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not
> stripped
>
> Is there a way to build again the same "a.old" --> on my actual
> system, build the program for the old system ?
It is possible in principle by essentially setting up a little version
of the old system, with the old compiler, binutils, and glibc, all
properly configured and built to work together. It's a fair bit of
work, though. There is no simple way to do it. This of course assumes
that you have the original source code.
At least, that is what it would take to build the exact same a.old, with
the same resulting bytes. If you have a looser meaning of "same" than
perhaps a simpler procedure would be possible.
Ian