* [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled @ 2023-01-03 13:53 Clément Chigot 2023-01-03 15:59 ` Andrew Pinski 2023-01-03 17:41 ` Andrew Pinski 0 siblings, 2 replies; 10+ messages in thread From: Clément Chigot @ 2023-01-03 13:53 UTC (permalink / raw) To: binutils; +Cc: pinskia, nickc, Clément Chigot Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks about GMP and MPFR for gdb builds have been moved to the toplevel configure. However, it doesn't take into account the --disable-gdb option. Meaning that a build without gdb will require these libraries even if not needed. ChangeLog: * configure.ac: Skip GMP and MPFR errors when --disable-gdb is provided. * configure: Regenerate. --- configure | 4 +++- configure.ac | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 417fc5a970c..0fb8279cb8f 100755 --- a/configure +++ b/configure @@ -8426,11 +8426,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, make sure that you have installed both the libraries and the header files. They may be located in separate packages." "$LINENO" 5 else - as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. + if test "x$enable_gdb" != xno; then + as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. Try the --with-gmp and/or --with-mpfr options to specify their locations. If you obtained GMP and/or MPFR from a vendor distribution package, make sure that you have installed both the libraries and the header files. They may be located in separate packages." "$LINENO" 5 + fi fi fi fi diff --git a/configure.ac b/configure.ac index 3a1eb0357e5..0ec2fffcb56 100644 --- a/configure.ac +++ b/configure.ac @@ -1814,11 +1814,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, make sure that you have installed both the libraries and the header files. They may be located in separate packages.]) else - AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. + if test "x$enable_gdb" != xno; then + AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. Try the --with-gmp and/or --with-mpfr options to specify their locations. If you obtained GMP and/or MPFR from a vendor distribution package, make sure that you have installed both the libraries and the header files. They may be located in separate packages.]) + fi fi fi fi -- 2.25.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled 2023-01-03 13:53 [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled Clément Chigot @ 2023-01-03 15:59 ` Andrew Pinski 2023-01-03 16:21 ` Clément Chigot 2023-01-03 17:41 ` Andrew Pinski 1 sibling, 1 reply; 10+ messages in thread From: Andrew Pinski @ 2023-01-03 15:59 UTC (permalink / raw) To: Clément Chigot; +Cc: binutils, nickc On Tue, Jan 3, 2023 at 5:53 AM Clément Chigot <chigot@adacore.com> wrote: > > Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks > about GMP and MPFR for gdb builds have been moved to the toplevel > configure. > However, it doesn't take into account the --disable-gdb option. Meaning > that a build without gdb will require these libraries even if not > needed. Here is a much simpler patch and disables the whole check for gmp/mpfr rather than just disables the error message, it is like the gdbserver check earlier: diff --git a/configure.ac b/configure.ac index 3a1eb0357e5..c184dc27201 100644 --- a/configure.ac +++ b/configure.ac @@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then require_mpc=yes fi if test -d ${srcdir}/gdb ; then - require_gmp=yes + if test x$enable_gdb = x; then + require_gmp=yes + fi fi gmplibs="-lmpfr -lgmp" Thanks, Andrew Pinski > > ChangeLog: > > * configure.ac: Skip GMP and MPFR errors when --disable-gdb is > provided. > * configure: Regenerate. > --- > configure | 4 +++- > configure.ac | 4 +++- > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/configure b/configure > index 417fc5a970c..0fb8279cb8f 100755 > --- a/configure > +++ b/configure > @@ -8426,11 +8426,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, > make sure that you have installed both the libraries and the header > files. They may be located in separate packages." "$LINENO" 5 > else > - as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > + if test "x$enable_gdb" != xno; then > + as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > Try the --with-gmp and/or --with-mpfr options to specify > their locations. If you obtained GMP and/or MPFR from a vendor > distribution package, make sure that you have installed both the libraries > and the header files. They may be located in separate packages." "$LINENO" 5 > + fi > fi > fi > fi > diff --git a/configure.ac b/configure.ac > index 3a1eb0357e5..0ec2fffcb56 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1814,11 +1814,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, > make sure that you have installed both the libraries and the header > files. They may be located in separate packages.]) > else > - AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > + if test "x$enable_gdb" != xno; then > + AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > Try the --with-gmp and/or --with-mpfr options to specify > their locations. If you obtained GMP and/or MPFR from a vendor > distribution package, make sure that you have installed both the libraries > and the header files. They may be located in separate packages.]) > + fi > fi > fi > fi > -- > 2.25.1 > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled 2023-01-03 15:59 ` Andrew Pinski @ 2023-01-03 16:21 ` Clément Chigot 2023-01-03 16:24 ` Andrew Pinski 0 siblings, 1 reply; 10+ messages in thread From: Clément Chigot @ 2023-01-03 16:21 UTC (permalink / raw) To: Andrew Pinski; +Cc: binutils, nickc Hi Andrew, On Tue, Jan 3, 2023 at 4:59 PM Andrew Pinski <pinskia@gmail.com> wrote: > > On Tue, Jan 3, 2023 at 5:53 AM Clément Chigot <chigot@adacore.com> wrote: > > > > Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks > > about GMP and MPFR for gdb builds have been moved to the toplevel > > configure. > > However, it doesn't take into account the --disable-gdb option. Meaning > > that a build without gdb will require these libraries even if not > > needed. > > Here is a much simpler patch and disables the whole check for gmp/mpfr > rather than just disables the error message, it is like the gdbserver > check earlier: > diff --git a/configure.ac b/configure.ac > index 3a1eb0357e5..c184dc27201 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then > require_mpc=yes > fi > if test -d ${srcdir}/gdb ; then > - require_gmp=yes > + if test x$enable_gdb = x; then > + require_gmp=yes > + fi > fi > > gmplibs="-lmpfr -lgmp" Indeed, thanks for that. However, it should be "test x$enable_gdb != xno". Otherwise, require_gmp is also disabled when gdb is explicitly enable (with --enable-gdb). But as all the similar patterns are similar to yours, I'm wondering if there isn't something wrong here. Thanks, Clément ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled 2023-01-03 16:21 ` Clément Chigot @ 2023-01-03 16:24 ` Andrew Pinski 2023-01-03 16:26 ` Clément Chigot 0 siblings, 1 reply; 10+ messages in thread From: Andrew Pinski @ 2023-01-03 16:24 UTC (permalink / raw) To: Clément Chigot; +Cc: binutils, nickc On Tue, Jan 3, 2023 at 8:21 AM Clément Chigot <chigot@adacore.com> wrote: > > Hi Andrew, > > On Tue, Jan 3, 2023 at 4:59 PM Andrew Pinski <pinskia@gmail.com> wrote: > > > > On Tue, Jan 3, 2023 at 5:53 AM Clément Chigot <chigot@adacore.com> wrote: > > > > > > Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks > > > about GMP and MPFR for gdb builds have been moved to the toplevel > > > configure. > > > However, it doesn't take into account the --disable-gdb option. Meaning > > > that a build without gdb will require these libraries even if not > > > needed. > > > > Here is a much simpler patch and disables the whole check for gmp/mpfr > > rather than just disables the error message, it is like the gdbserver > > check earlier: > > diff --git a/configure.ac b/configure.ac > > index 3a1eb0357e5..c184dc27201 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then > > require_mpc=yes > > fi > > if test -d ${srcdir}/gdb ; then > > - require_gmp=yes > > + if test x$enable_gdb = x; then > > + require_gmp=yes > > + fi > > fi > > > > gmplibs="-lmpfr -lgmp" > > Indeed, thanks for that. > > However, it should be "test x$enable_gdb != xno". Otherwise, > require_gmp is also disabled when gdb is explicitly enable (with > --enable-gdb). > But as all the similar patterns are similar to yours, I'm wondering if > there isn't something wrong here. Yes it should be "!= xno". Looking at the other uses of "!= x" they are there to test if overriding the other check if they should be enabled or disabled so those uses are ok. I just missed that. Thanks, Andrew Pinski > > Thanks, > Clément ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled 2023-01-03 16:24 ` Andrew Pinski @ 2023-01-03 16:26 ` Clément Chigot 0 siblings, 0 replies; 10+ messages in thread From: Clément Chigot @ 2023-01-03 16:26 UTC (permalink / raw) To: Andrew Pinski; +Cc: binutils, nickc On Tue, Jan 3, 2023 at 5:24 PM Andrew Pinski <pinskia@gmail.com> wrote: > > On Tue, Jan 3, 2023 at 8:21 AM Clément Chigot <chigot@adacore.com> wrote: > > > > Hi Andrew, > > > > On Tue, Jan 3, 2023 at 4:59 PM Andrew Pinski <pinskia@gmail.com> wrote: > > > > > > On Tue, Jan 3, 2023 at 5:53 AM Clément Chigot <chigot@adacore.com> wrote: > > > > > > > > Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks > > > > about GMP and MPFR for gdb builds have been moved to the toplevel > > > > configure. > > > > However, it doesn't take into account the --disable-gdb option. Meaning > > > > that a build without gdb will require these libraries even if not > > > > needed. > > > > > > Here is a much simpler patch and disables the whole check for gmp/mpfr > > > rather than just disables the error message, it is like the gdbserver > > > check earlier: > > > diff --git a/configure.ac b/configure.ac > > > index 3a1eb0357e5..c184dc27201 100644 > > > --- a/configure.ac > > > +++ b/configure.ac > > > @@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then > > > require_mpc=yes > > > fi > > > if test -d ${srcdir}/gdb ; then > > > - require_gmp=yes > > > + if test x$enable_gdb = x; then > > > + require_gmp=yes > > > + fi > > > fi > > > > > > gmplibs="-lmpfr -lgmp" > > > > Indeed, thanks for that. > > > > However, it should be "test x$enable_gdb != xno". Otherwise, > > require_gmp is also disabled when gdb is explicitly enable (with > > --enable-gdb). > > But as all the similar patterns are similar to yours, I'm wondering if > > there isn't something wrong here. > > Yes it should be "!= xno". Looking at the other uses of "!= x" they > are there to test if overriding the other check if they should be > enabled or disabled so those uses are ok. I just missed that. Ok thanks for confirming. Send v2. Clément ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled 2023-01-03 13:53 [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled Clément Chigot 2023-01-03 15:59 ` Andrew Pinski @ 2023-01-03 17:41 ` Andrew Pinski 2023-01-04 7:51 ` Clément Chigot 1 sibling, 1 reply; 10+ messages in thread From: Andrew Pinski @ 2023-01-03 17:41 UTC (permalink / raw) To: Clément Chigot; +Cc: binutils, nickc On Tue, Jan 3, 2023 at 5:53 AM Clément Chigot <chigot@adacore.com> wrote: > > Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks > about GMP and MPFR for gdb builds have been moved to the toplevel > configure. > However, it doesn't take into account the --disable-gdb option. Meaning > that a build without gdb will require these libraries even if not > needed. I see the conversion of enable_gdb to noconfigdirs is not done until later or I would have suggested the patch below. Though I wonder if we should rearrange configure.ac but maybe that is post GCC 13 branching off. Thanks, Andrew Pinski diff --git a/configure.ac b/configure.ac index 3a1eb0357e5..cbfc21eb2e9 100644 --- a/configure.ac +++ b/configure.ac @@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then require_mpc=yes fi if test -d ${srcdir}/gdb ; then - require_gmp=yes + case "${noconfigdirs}" in + *gdb*) require_gmp=yes ;; + esac fi gmplibs="-lmpfr -lgmp" > > ChangeLog: > > * configure.ac: Skip GMP and MPFR errors when --disable-gdb is > provided. > * configure: Regenerate. > --- > configure | 4 +++- > configure.ac | 4 +++- > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/configure b/configure > index 417fc5a970c..0fb8279cb8f 100755 > --- a/configure > +++ b/configure > @@ -8426,11 +8426,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, > make sure that you have installed both the libraries and the header > files. They may be located in separate packages." "$LINENO" 5 > else > - as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > + if test "x$enable_gdb" != xno; then > + as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > Try the --with-gmp and/or --with-mpfr options to specify > their locations. If you obtained GMP and/or MPFR from a vendor > distribution package, make sure that you have installed both the libraries > and the header files. They may be located in separate packages." "$LINENO" 5 > + fi > fi > fi > fi > diff --git a/configure.ac b/configure.ac > index 3a1eb0357e5..0ec2fffcb56 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1814,11 +1814,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, > make sure that you have installed both the libraries and the header > files. They may be located in separate packages.]) > else > - AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > + if test "x$enable_gdb" != xno; then > + AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > Try the --with-gmp and/or --with-mpfr options to specify > their locations. If you obtained GMP and/or MPFR from a vendor > distribution package, make sure that you have installed both the libraries > and the header files. They may be located in separate packages.]) > + fi > fi > fi > fi > -- > 2.25.1 > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled 2023-01-03 17:41 ` Andrew Pinski @ 2023-01-04 7:51 ` Clément Chigot 2023-01-04 14:50 ` Richard Earnshaw 0 siblings, 1 reply; 10+ messages in thread From: Clément Chigot @ 2023-01-04 7:51 UTC (permalink / raw) To: Andrew Pinski; +Cc: binutils, nickc Hi Andrew, On Tue, Jan 3, 2023 at 6:41 PM Andrew Pinski <pinskia@gmail.com> wrote: > > On Tue, Jan 3, 2023 at 5:53 AM Clément Chigot <chigot@adacore.com> wrote: > > > > Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks > > about GMP and MPFR for gdb builds have been moved to the toplevel > > configure. > > However, it doesn't take into account the --disable-gdb option. Meaning > > that a build without gdb will require these libraries even if not > > needed. > > I see the conversion of enable_gdb to noconfigdirs is not done until > later or I would have suggested the patch below. > Though I wonder if we should rearrange configure.ac but maybe that is > post GCC 13 branching off. That might be a good idea. But for now, I would rather fix the build of binutils rapidly, if you don't mind. For my personal knowledge, why are the GCC directories being "configurable" with the binutils configure ? I find it weird to have --enable-libgo in binutils configure. Clément > Thanks, > Andrew Pinski > > diff --git a/configure.ac b/configure.ac > index 3a1eb0357e5..cbfc21eb2e9 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then > require_mpc=yes > fi > if test -d ${srcdir}/gdb ; then > - require_gmp=yes > + case "${noconfigdirs}" in > + *gdb*) require_gmp=yes ;; > + esac > fi > > gmplibs="-lmpfr -lgmp" > > > > > ChangeLog: > > > > * configure.ac: Skip GMP and MPFR errors when --disable-gdb is > > provided. > > * configure: Regenerate. > > --- > > configure | 4 +++- > > configure.ac | 4 +++- > > 2 files changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/configure b/configure > > index 417fc5a970c..0fb8279cb8f 100755 > > --- a/configure > > +++ b/configure > > @@ -8426,11 +8426,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, > > make sure that you have installed both the libraries and the header > > files. They may be located in separate packages." "$LINENO" 5 > > else > > - as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > > + if test "x$enable_gdb" != xno; then > > + as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > > Try the --with-gmp and/or --with-mpfr options to specify > > their locations. If you obtained GMP and/or MPFR from a vendor > > distribution package, make sure that you have installed both the libraries > > and the header files. They may be located in separate packages." "$LINENO" 5 > > + fi > > fi > > fi > > fi > > diff --git a/configure.ac b/configure.ac > > index 3a1eb0357e5..0ec2fffcb56 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -1814,11 +1814,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, > > make sure that you have installed both the libraries and the header > > files. They may be located in separate packages.]) > > else > > - AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > > + if test "x$enable_gdb" != xno; then > > + AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > > Try the --with-gmp and/or --with-mpfr options to specify > > their locations. If you obtained GMP and/or MPFR from a vendor > > distribution package, make sure that you have installed both the libraries > > and the header files. They may be located in separate packages.]) > > + fi > > fi > > fi > > fi > > -- > > 2.25.1 > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled 2023-01-04 7:51 ` Clément Chigot @ 2023-01-04 14:50 ` Richard Earnshaw 2023-01-04 17:50 ` Andrew Pinski 0 siblings, 1 reply; 10+ messages in thread From: Richard Earnshaw @ 2023-01-04 14:50 UTC (permalink / raw) To: Clément Chigot, Andrew Pinski; +Cc: binutils, nickc On 04/01/2023 07:51, Clément Chigot via Binutils wrote: > Hi Andrew, > > On Tue, Jan 3, 2023 at 6:41 PM Andrew Pinski <pinskia@gmail.com> wrote: >> >> On Tue, Jan 3, 2023 at 5:53 AM Clément Chigot <chigot@adacore.com> wrote: >>> >>> Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks >>> about GMP and MPFR for gdb builds have been moved to the toplevel >>> configure. >>> However, it doesn't take into account the --disable-gdb option. Meaning >>> that a build without gdb will require these libraries even if not >>> needed. >> >> I see the conversion of enable_gdb to noconfigdirs is not done until >> later or I would have suggested the patch below. >> Though I wonder if we should rearrange configure.ac but maybe that is >> post GCC 13 branching off. > > That might be a good idea. But for now, I would rather fix the build > of binutils rapidly, if you don't mind. > > For my personal knowledge, why are the GCC directories being > "configurable" with the binutils configure ? I find it weird to have > --enable-libgo in binutils configure. The top-level configure framework supports a 'unified' build tree containing sources for all the GNU toolchain components. I for one still use that. R. > > Clément > >> Thanks, >> Andrew Pinski >> >> diff --git a/configure.ac b/configure.ac >> index 3a1eb0357e5..cbfc21eb2e9 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then >> require_mpc=yes >> fi >> if test -d ${srcdir}/gdb ; then >> - require_gmp=yes >> + case "${noconfigdirs}" in >> + *gdb*) require_gmp=yes ;; >> + esac >> fi >> >> gmplibs="-lmpfr -lgmp" >> >>> >>> ChangeLog: >>> >>> * configure.ac: Skip GMP and MPFR errors when --disable-gdb is >>> provided. >>> * configure: Regenerate. >>> --- >>> configure | 4 +++- >>> configure.ac | 4 +++- >>> 2 files changed, 6 insertions(+), 2 deletions(-) >>> >>> diff --git a/configure b/configure >>> index 417fc5a970c..0fb8279cb8f 100755 >>> --- a/configure >>> +++ b/configure >>> @@ -8426,11 +8426,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, >>> make sure that you have installed both the libraries and the header >>> files. They may be located in separate packages." "$LINENO" 5 >>> else >>> - as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. >>> + if test "x$enable_gdb" != xno; then >>> + as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. >>> Try the --with-gmp and/or --with-mpfr options to specify >>> their locations. If you obtained GMP and/or MPFR from a vendor >>> distribution package, make sure that you have installed both the libraries >>> and the header files. They may be located in separate packages." "$LINENO" 5 >>> + fi >>> fi >>> fi >>> fi >>> diff --git a/configure.ac b/configure.ac >>> index 3a1eb0357e5..0ec2fffcb56 100644 >>> --- a/configure.ac >>> +++ b/configure.ac >>> @@ -1814,11 +1814,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, >>> make sure that you have installed both the libraries and the header >>> files. They may be located in separate packages.]) >>> else >>> - AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. >>> + if test "x$enable_gdb" != xno; then >>> + AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. >>> Try the --with-gmp and/or --with-mpfr options to specify >>> their locations. If you obtained GMP and/or MPFR from a vendor >>> distribution package, make sure that you have installed both the libraries >>> and the header files. They may be located in separate packages.]) >>> + fi >>> fi >>> fi >>> fi >>> -- >>> 2.25.1 >>> ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled 2023-01-04 14:50 ` Richard Earnshaw @ 2023-01-04 17:50 ` Andrew Pinski 2023-01-05 8:04 ` Clément Chigot 0 siblings, 1 reply; 10+ messages in thread From: Andrew Pinski @ 2023-01-04 17:50 UTC (permalink / raw) To: Richard Earnshaw; +Cc: Clément Chigot, binutils, nickc On Wed, Jan 4, 2023 at 6:50 AM Richard Earnshaw <Richard.Earnshaw@foss.arm.com> wrote: > > > > On 04/01/2023 07:51, Clément Chigot via Binutils wrote: > > Hi Andrew, > > > > On Tue, Jan 3, 2023 at 6:41 PM Andrew Pinski <pinskia@gmail.com> wrote: > >> > >> On Tue, Jan 3, 2023 at 5:53 AM Clément Chigot <chigot@adacore.com> wrote: > >>> > >>> Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks > >>> about GMP and MPFR for gdb builds have been moved to the toplevel > >>> configure. > >>> However, it doesn't take into account the --disable-gdb option. Meaning > >>> that a build without gdb will require these libraries even if not > >>> needed. > >> > >> I see the conversion of enable_gdb to noconfigdirs is not done until > >> later or I would have suggested the patch below. > >> Though I wonder if we should rearrange configure.ac but maybe that is > >> post GCC 13 branching off. > > > > That might be a good idea. But for now, I would rather fix the build > > of binutils rapidly, if you don't mind. > > > > For my personal knowledge, why are the GCC directories being > > "configurable" with the binutils configure ? I find it weird to have > > --enable-libgo in binutils configure. > > The top-level configure framework supports a 'unified' build tree > containing sources for all the GNU toolchain components. I for one > still use that. I use it too and that was the original reason why I did the original GDB GMP/MPFR patch; otherwise I would need to compile GMP/MPFR out of tree for a "native" cross build first even though the support was there to support it for GCC already. Thanks, Andrew Pinski > > R. > > > > > Clément > > > >> Thanks, > >> Andrew Pinski > >> > >> diff --git a/configure.ac b/configure.ac > >> index 3a1eb0357e5..cbfc21eb2e9 100644 > >> --- a/configure.ac > >> +++ b/configure.ac > >> @@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then > >> require_mpc=yes > >> fi > >> if test -d ${srcdir}/gdb ; then > >> - require_gmp=yes > >> + case "${noconfigdirs}" in > >> + *gdb*) require_gmp=yes ;; > >> + esac > >> fi > >> > >> gmplibs="-lmpfr -lgmp" > >> > >>> > >>> ChangeLog: > >>> > >>> * configure.ac: Skip GMP and MPFR errors when --disable-gdb is > >>> provided. > >>> * configure: Regenerate. > >>> --- > >>> configure | 4 +++- > >>> configure.ac | 4 +++- > >>> 2 files changed, 6 insertions(+), 2 deletions(-) > >>> > >>> diff --git a/configure b/configure > >>> index 417fc5a970c..0fb8279cb8f 100755 > >>> --- a/configure > >>> +++ b/configure > >>> @@ -8426,11 +8426,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, > >>> make sure that you have installed both the libraries and the header > >>> files. They may be located in separate packages." "$LINENO" 5 > >>> else > >>> - as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > >>> + if test "x$enable_gdb" != xno; then > >>> + as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > >>> Try the --with-gmp and/or --with-mpfr options to specify > >>> their locations. If you obtained GMP and/or MPFR from a vendor > >>> distribution package, make sure that you have installed both the libraries > >>> and the header files. They may be located in separate packages." "$LINENO" 5 > >>> + fi > >>> fi > >>> fi > >>> fi > >>> diff --git a/configure.ac b/configure.ac > >>> index 3a1eb0357e5..0ec2fffcb56 100644 > >>> --- a/configure.ac > >>> +++ b/configure.ac > >>> @@ -1814,11 +1814,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, > >>> make sure that you have installed both the libraries and the header > >>> files. They may be located in separate packages.]) > >>> else > >>> - AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > >>> + if test "x$enable_gdb" != xno; then > >>> + AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > >>> Try the --with-gmp and/or --with-mpfr options to specify > >>> their locations. If you obtained GMP and/or MPFR from a vendor > >>> distribution package, make sure that you have installed both the libraries > >>> and the header files. They may be located in separate packages.]) > >>> + fi > >>> fi > >>> fi > >>> fi > >>> -- > >>> 2.25.1 > >>> ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled 2023-01-04 17:50 ` Andrew Pinski @ 2023-01-05 8:04 ` Clément Chigot 0 siblings, 0 replies; 10+ messages in thread From: Clément Chigot @ 2023-01-05 8:04 UTC (permalink / raw) To: Andrew Pinski; +Cc: Richard Earnshaw, binutils, nickc On Wed, Jan 4, 2023 at 6:50 PM Andrew Pinski <pinskia@gmail.com> wrote: > > On Wed, Jan 4, 2023 at 6:50 AM Richard Earnshaw > <Richard.Earnshaw@foss.arm.com> wrote: > > > > > > > > On 04/01/2023 07:51, Clément Chigot via Binutils wrote: > > > Hi Andrew, > > > > > > On Tue, Jan 3, 2023 at 6:41 PM Andrew Pinski <pinskia@gmail.com> wrote: > > >> > > >> On Tue, Jan 3, 2023 at 5:53 AM Clément Chigot <chigot@adacore.com> wrote: > > >>> > > >>> Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks > > >>> about GMP and MPFR for gdb builds have been moved to the toplevel > > >>> configure. > > >>> However, it doesn't take into account the --disable-gdb option. Meaning > > >>> that a build without gdb will require these libraries even if not > > >>> needed. > > >> > > >> I see the conversion of enable_gdb to noconfigdirs is not done until > > >> later or I would have suggested the patch below. > > >> Though I wonder if we should rearrange configure.ac but maybe that is > > >> post GCC 13 branching off. > > > > > > That might be a good idea. But for now, I would rather fix the build > > > of binutils rapidly, if you don't mind. > > > > > > For my personal knowledge, why are the GCC directories being > > > "configurable" with the binutils configure ? I find it weird to have > > > --enable-libgo in binutils configure. > > > > The top-level configure framework supports a 'unified' build tree > > containing sources for all the GNU toolchain components. I for one > > still use that. > > I use it too and that was the original reason why I did the original > GDB GMP/MPFR patch; otherwise I would need to compile GMP/MPFR out of > tree for a "native" cross build first even though the support was > there to support it for GCC already. Ok I wasn't aware of that possibility. Thanks for the clarifications ! Clément > > > > R. > > > > > > > > Clément > > > > > >> Thanks, > > >> Andrew Pinski > > >> > > >> diff --git a/configure.ac b/configure.ac > > >> index 3a1eb0357e5..cbfc21eb2e9 100644 > > >> --- a/configure.ac > > >> +++ b/configure.ac > > >> @@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then > > >> require_mpc=yes > > >> fi > > >> if test -d ${srcdir}/gdb ; then > > >> - require_gmp=yes > > >> + case "${noconfigdirs}" in > > >> + *gdb*) require_gmp=yes ;; > > >> + esac > > >> fi > > >> > > >> gmplibs="-lmpfr -lgmp" > > >> > > >>> > > >>> ChangeLog: > > >>> > > >>> * configure.ac: Skip GMP and MPFR errors when --disable-gdb is > > >>> provided. > > >>> * configure: Regenerate. > > >>> --- > > >>> configure | 4 +++- > > >>> configure.ac | 4 +++- > > >>> 2 files changed, 6 insertions(+), 2 deletions(-) > > >>> > > >>> diff --git a/configure b/configure > > >>> index 417fc5a970c..0fb8279cb8f 100755 > > >>> --- a/configure > > >>> +++ b/configure > > >>> @@ -8426,11 +8426,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, > > >>> make sure that you have installed both the libraries and the header > > >>> files. They may be located in separate packages." "$LINENO" 5 > > >>> else > > >>> - as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > > >>> + if test "x$enable_gdb" != xno; then > > >>> + as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > > >>> Try the --with-gmp and/or --with-mpfr options to specify > > >>> their locations. If you obtained GMP and/or MPFR from a vendor > > >>> distribution package, make sure that you have installed both the libraries > > >>> and the header files. They may be located in separate packages." "$LINENO" 5 > > >>> + fi > > >>> fi > > >>> fi > > >>> fi > > >>> diff --git a/configure.ac b/configure.ac > > >>> index 3a1eb0357e5..0ec2fffcb56 100644 > > >>> --- a/configure.ac > > >>> +++ b/configure.ac > > >>> @@ -1814,11 +1814,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package, > > >>> make sure that you have installed both the libraries and the header > > >>> files. They may be located in separate packages.]) > > >>> else > > >>> - AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > > >>> + if test "x$enable_gdb" != xno; then > > >>> + AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > > >>> Try the --with-gmp and/or --with-mpfr options to specify > > >>> their locations. If you obtained GMP and/or MPFR from a vendor > > >>> distribution package, make sure that you have installed both the libraries > > >>> and the header files. They may be located in separate packages.]) > > >>> + fi > > >>> fi > > >>> fi > > >>> fi > > >>> -- > > >>> 2.25.1 > > >>> ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-01-05 8:04 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-01-03 13:53 [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled Clément Chigot 2023-01-03 15:59 ` Andrew Pinski 2023-01-03 16:21 ` Clément Chigot 2023-01-03 16:24 ` Andrew Pinski 2023-01-03 16:26 ` Clément Chigot 2023-01-03 17:41 ` Andrew Pinski 2023-01-04 7:51 ` Clément Chigot 2023-01-04 14:50 ` Richard Earnshaw 2023-01-04 17:50 ` Andrew Pinski 2023-01-05 8:04 ` Clément Chigot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).