You should be able to figure it out from this:
$ ~/src/gcc/gcc/configure --help | fgrep gmp
--with-gmp-dir=PATH this option has been REMOVED
--with-gmp=PATH specify prefix directory for the installed GMP
--with-gmp-include=PATH/include plus
--with-gmp-lib=PATH/lib
--with-gmp-include=PATH specify directory for installed GMP include files
--with-gmp-lib=PATH specify directory for the installed GMP library
Also, https://gcc.gnu.org/install/prerequisites.html says
Alternatively, if GMP is already installed but it is not in your library search path, you will have to configure with the --with-gmp
configure option. See also --with-gmp-lib
and --with-gmp-include
.
And of course, https://gcc.gnu.org/install/configure.html says
--with-gmp=
pathname
--with-gmp-include=
pathname
--with-gmp-lib=
pathname
--with-mpfr=
pathname
--with-mpfr-include=
pathname
--with-mpfr-lib=
pathname
--with-mpc=
pathname
--with-mpc-include=
pathname
--with-mpc-lib=
pathname
If you want to build GCC but do not have the GMP library, the MPFR library and/or the MPC library installed in a standard location and do not have their sources present in the GCC source tree then you can explicitly specify the directory where they are installed (‘--with-gmp=
gmpinstalldir’, ‘--with-mpfr
=mpfrinstalldir’, ‘--with-mpc=
mpcinstalldir’). The --with-gmp=
gmpinstalldir option is shorthand for --with-gmp-lib=
gmpinstalldir/lib
and --with-gmp-include=
gmpinstalldir/include
. Likewise the --with-mpfr=
mpfrinstalldir option is shorthand for --with-mpfr-lib=
mpfrinstalldir/lib
and --with-mpfr-include=
mpfrinstalldir/include
, also the --with-mpc=
mpcinstalldir option is shorthand for --with-mpc-lib=
mpcinstalldir/lib
and --with-mpc-include=
mpcinstalldir/include. If these shorthand assumptions are not correct, you can use the explicit include and lib options directly. You might also need to ensure the shared libraries can be found by the dynamic linker when building and using GCC, for example by setting the runtime shared library path variable (LD_LIBRARY_PATH
on GNU/Linux and Solaris systems).
That should make it pretty obvious that it's completely normal, even expected, that the files will not all be in one directory. Almost all UNIX software installs header files and libraries in separate directories.
It's usually easier to build those libs in-tree and link GCC to them statically, as described at http://gcc.gnu.org/wiki/InstallingGCC
download_prerequisites
script in thecontrib
folder of your source directory and thenconfigure
without the lib options. – user657267--with-mpfr=/usr/local
? – Ned Deily