I need to use lesser version of packages for building my toolchain. Is there anyway to build gcc by disabling the mpc, mpfr and gmp packages?
1 Answers
There is a script called contrib/download_prerequisites
in the GCC source tree. From the installation instructions:
Likewise the GMP, MPFR and MPC libraries can be automatically built together with GCC. You may simply run the
contrib/download_prerequisites
script in the GCC source directory to set up everything. Otherwise unpack the GMP, MPFR and/or MPC source distributions in the directory containing the GCC sources and rename their directories togmp
,mpfr
andmpc
, respectively (or use symbolic links with the same name).
In order to be effective, the script If contrib/download_prerequisites
must be invoked in the top-level directory of the source tree (i.e, the directory which contains contrib
as a subdirectory).
As a result, GMP, MPFR and MPC will be bundled, and do not have to be installed separately for use by the rest of the operating system.

- 32,022
- 3
- 48
- 92
-
Thanks, but I am looking to avoid using the packages GMP, MPFR and MPC to build Gcc. Is there a way to build Gcc without those packages – prasanth Oct 25 '17 at 11:18
-
No. But you do not actually have to install these packages, so it's just as if they weren't there. – Florian Weimer Oct 25 '17 at 11:29
-
sorry, I didn't get your point, does you mean these packages are not necessary for building GCC, if so while configuring I am gett error which expects for headers from those packages... – prasanth Oct 26 '17 at 10:46
-
I hope, You work with glibc, Have you got a chance to look into sprof profiling, which leads to Inconsistency detected by ld.so: dl-open.c: 707: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed! – prasanth Oct 26 '17 at 10:48
-
Regarding the profiling issue, please file a bug report against the relevant distribution. Thanks. – Florian Weimer Oct 26 '17 at 10:50
-
If you run `contrib/download_prerequisites` in the toplevel directory of the source tree, the `configure` script will subsequently pick up the downloaded sources and use them. The system packages are no longer required. – Florian Weimer Oct 26 '17 at 10:52