This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: Compiling pgm for an older linux version - cross compiler


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]