Does gdb/configure ignore --with-gmp?
Joel Sherrill
joel@rtems.org
Wed Feb 3 13:38:08 GMT 2021
On Wed, Feb 3, 2021 at 1:50 AM Stephen Casner <casner@acm.org> wrote:
> On Wed, 3 Feb 2021, Joel Brobecker wrote:
>
> > > > This even though I have the --with-gmp and /usr/local/lib/libgmp.*
> > > > exist. I need to investigate that further.
> > >
> > > The error is that gmp.h is not found when compiling conftest. But the
> > > compile command does not include -I/usr/local/include which it should,
> > > based on the configure option. Is that a bug in gdb/configure.ac?
> > > The option did get passed to gdb/configure as shown in gdb/config.log.
> >
> > The correct option is the following:
> >
> > `--with-libgmp-prefix=DIR'
> > Build GDB using the GMP library installed at the directory DIR.
> > If your host does not have GMP installed, you can get the latest
> > version at `https://gmplib.org/'.
> >
> > (it's documented in gdb/README, if you are looking for it)
>
> Thank you for the prompt reply. That option is not listed by the
> top-level configure -h which has only this to say about gmp:
>
> --with-gmp-dir=PATH this option has been REMOVED
> --with-gmp=PATH specify prefix directory for the installed GMP
> package. Equivalent to
> --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
>
> Is that a (minor) bug then? Or is --with-gmp the proper form for gcc?
>
I'll pile on to this one. I did manage to find the right option in
gdb/configure
after some digging into the error message. I don't think anyone not willing
to dig would find it at all. Not being in sync with the top level configure
help
is quite confusing.
Also why can't it use gmp from source if it is in the source tree like GCC?
Overall, this is very unlike how GCC handles this one and awkward.
--joel
RTEMS
>
> -- Steve
>
More information about the Binutils
mailing list