You could try recompiling the source deb package you get from wheezy, on your jessie instance. Please note that I'm assuming gcc-4.7
can be compiled without errors using gcc-4.9
, which is not a sure bet.
However the general procedure should be:
- Add wheezy binaries as source to your
/etc/apt/sources.list
file, such as deb http://ftp.us.debian.org/debian/ wheezy main contrib
- Add wheezy sources as source to your
/etc/apt/sources.list
file, such as deb-src http://ftp.us.debian.org/debian/ wheezy main contrib
- run
apt-get update
- download the
gcc-4.7
source package: apt-get source gcc-4.7
- install
gcc-4.7
build-dependencies by running apt-get build-dep gcc-4.7
(this can be quite hard actually, because there might be a number of conflicts with your currently installed packages and you need to sort them out manually)
- enter the directory where
apt-get
downloaded gcc-4.7
source package in step 4, e.g. cd gcc-4.7
or whatever it is called
- build gcc-4.7:
dpkg-buildpackage -us -uc
- assuming it builds without errors, install the generated packages you'll find in the parent directory
I've written this procedure going by memory, so please take it with a grain of salt and adjust commands where needed. In particular I'm not sure dpkg-buildpackage
-us
and -uc
options existed in jessie, if they didn't just don't use them.