Re: Install or build an older gcc/g++ on new Debian (GCC backport)

2018-02-23 Thread Reco
Hi.

On Fri, Feb 23, 2018 at 05:57:59PM +, Bas Ali wrote:
> 
> Hi,
> Just to need help for what concerning to build or/and install an older GCC on 
> a new Debian Distro (e.g 8.8 or 9.3)
> The goal is to be able to compile and build binaries on the New Debian with 
> an older GCC to keep backcompatibility of binaries program previously built 
> on Debian 7 (32bits Wheezy)  using the built-in GCC (4.7.2). Ideally the two 
> binaries built from a Debian 7 32bits and from Debian 8 64bits will be the 
> same byte a byte. 

That could be much more complex than using old GCC.
These guys - [1] - are trying to solve much easier problem - and they
aren't there yet.


> At this moment I know that it possible (but maybe not the good solution ?) to 
> build a 4.7.2 GCC source with the Built-in GCC of a Debian 8.8 (64bits 
> Jessie) but it appears that for > 4.5 GCC there is a need to build too other 
> packages (MPC, MPFR,..) separately (using some option to built on good 
> directory).

Being lazy, I solve such problems with good old chroot.
I mean, why go into all this trouble by compiling a toolchain from the
source if someone did it already.

You need something built for Debian 7 i386? Make a chroot of Debian 7
i386 and build you binaries there.

Making chroot by hand sounds too complex? Use LXC, they have a nice easy
way to set up pretty much any major Linux distribution in a container.

[1] https://wiki.debian.org/ReproducibleBuilds

Reco



Re: Install or build an older gcc/g++ on new Debian (GCC backport)

2018-02-23 Thread Greg Wooledge
On Fri, Feb 23, 2018 at 05:57:59PM +, Bas Ali wrote:
> Just to need help for what concerning to build or/and install an older GCC on 
> a new Debian Distro (e.g 8.8 or 9.3)
> The goal is to be able to compile and build binaries on the New Debian with 
> an older GCC to keep backcompatibility of binaries program previously built 
> on Debian 7 (32bits Wheezy)  using the built-in GCC (4.7.2). Ideally the two 
> binaries built from a Debian 7 32bits and from Debian 8 64bits will be the 
> same byte a byte. 

Just install wheezy in a chroot and compile there, if you want to produce
programs that can run on wheezy.



Install or build an older gcc/g++ on new Debian (GCC backport)

2018-02-23 Thread Bas Ali

Hi,
Just to need help for what concerning to build or/and install an older GCC on a 
new Debian Distro (e.g 8.8 or 9.3)
The goal is to be able to compile and build binaries on the New Debian with an 
older GCC to keep backcompatibility of binaries program previously built on 
Debian 7 (32bits Wheezy)  using the built-in GCC (4.7.2). Ideally the two 
binaries built from a Debian 7 32bits and from Debian 8 64bits will be the same 
byte a byte. 
At this moment I know that it possible (but maybe not the good solution ?) to 
build a 4.7.2 GCC source with the Built-in GCC of a Debian 8.8 (64bits Jessie) 
but it appears that for > 4.5 GCC there is a need to build too other packages 
(MPC, MPFR,..) separately (using some option to built on good directory).
Is this method bellow correct ? 
I think there will be the main libraries (libgcc, libc, libstdc++,.. ) to check 
for changes from previous version etc...
 Do I need to install gcc-multilib because the 4.7.2 GCC was from a 32 bits 
machine ?Do I need to add Multi ARCH  (e.g.: dpkg  --add-architecture i386) ?
Thanks in advanceAli