我需要使用较小版本的软件包来构建我的工具链。有没有办法通过禁用 mpc、mpfr 和 gmp 包来构建 gcc?
1 回答
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.