I've been asked to recreate a build of GCC 4.5.1 on both Red Hat 6 and Solaris 10. There are existing Red Hat 6 machines with 4.5.1 installed. The last Solaris 10 machine recently ate itself; hence, my inherited joy.
No one around knows what dependencies GCC was built with. We can easily get the configure options with gcc -v, but which versions of GMP, MPC, and MPFR were used is a mystery. I've tried:
Thanks in advance for your assistance.
Compile a source file with gcc -S -fverbose-asm. The versions of GMP and MFPR will be written as comments to the resulting .s assembly listing file:
# GNU C11 (Ubuntu 7.3.0-27ubuntu1~18.04) version 7.3.0 (x86_64-linux-gnu)
# compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP
On my system,. those version strings also appear in the output of
strings /usr/lib/gcc/x86_64-linux-gnu/7/cc1
However, I have access to a gcc 4.1.2 compiler, and it doesn't include this information:
# GNU C version 4.1.2 20080704 (Red Hat 4.1.2-55) (x86_64-redhat-linux)
# compiled by GNU C version 4.1.2 20080704 (Red Hat 4.1.2-55).
It is not officially recommended to try to download/compile gmp, mpfr and mpc from source. You should attempt to download it from your package manager first:
yum install gmp-devel mpfr-devel libmpc-devel
Failing that, the doc/install.texi that comes with GCC 4.5.0 recommends versions GMP 4.3.2 or later, MPFR 2.4.2 or later and MPC 0.8.1 or later.
GCC also supports doing source tree compilation with the dependencies. Newer versions of GCC has contrib/download_prerequisites, which doesn't exist in older versions. However, the earliest incarnation of the script simply downloads the tarballs and untars it in the GCC source directory (with stripped components). GCC detects it and will build it automatically.
The configure flags --with-mpfr, et al. are only if you already have the dependencies built elsewhere. This is the most painful option and should be done as a last resort.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With