public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425]
@ 2022-06-02 15:53 Eric Gallager
  2022-06-09 20:04 ` [PING][PATCH][WIP] " Eric Gallager
  2022-06-13 11:02 ` [PATCH][WIP] " Richard Biener
  0 siblings, 2 replies; 8+ messages in thread
From: Eric Gallager @ 2022-06-02 15:53 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

So, I'm working on fixing PR bootstrap/44425, and have this patch to
have the top-level configure script check in the value passed to
`--prefix=` when looking for gmp/mpfr/mpc. It "works" (in that
configuring with just `--prefix=` and none of
`--with-gmp=`/`--with-mpfr=`/`--with-mpc=` now works where it failed
before), but unfortunately it results in a bunch of duplicated
`-I`/`-L` flags stuck in ${gmplibs} and ${gmpinc}... is that
acceptable or should I try another approach?
Eric

[-- Attachment #2: patch-configure.diff --]
[-- Type: application/octet-stream, Size: 5127 bytes --]

diff --git a/configure b/configure
index 5dcaab14ae9..8ad9a9f8392 100755
--- a/configure
+++ b/configure
@@ -7983,12 +7983,19 @@ fi
 if test "x$with_mpc" != x; then
   gmplibs="-L$with_mpc/lib $gmplibs"
   gmpinc="-I$with_mpc/include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpc_include" != x; then
   gmpinc="-I$with_mpc_include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}/include"; then
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpc_lib" != x; then
   gmplibs="-L$with_mpc_lib $gmplibs"
+elif test "x${prefix}" != "x" && test -d "${prefix}/lib"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
 fi
 if test "x$with_mpc$with_mpc_include$with_mpc_lib" = x && test -d ${srcdir}/mpc; then
   gmplibs='-L$$r/$(HOST_SUBDIR)/mpc/src/'"$lt_cv_objdir $gmplibs"
@@ -8024,12 +8031,19 @@ fi
 if test "x$with_mpfr" != x; then
   gmplibs="-L$with_mpfr/lib $gmplibs"
   gmpinc="-I$with_mpfr/include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpfr_include" != x; then
   gmpinc="-I$with_mpfr_include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}/include"; then
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpfr_lib" != x; then
   gmplibs="-L$with_mpfr_lib $gmplibs"
+elif test "x${prefix}" != "x" && test -d "${prefix}/lib"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
 fi
 if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
   # MPFR v3.1.0 moved the sources into a src sub-directory.
@@ -8070,12 +8084,19 @@ fi
 if test "x$with_gmp" != x; then
   gmplibs="-L$with_gmp/lib $gmplibs"
   gmpinc="-I$with_gmp/include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_gmp_include" != x; then
   gmpinc="-I$with_gmp_include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}/include"; then
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_gmp_lib" != x; then
   gmplibs="-L$with_gmp_lib $gmplibs"
+elif test "x${prefix}" != "x" && test -d "${prefix}/lib"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
 fi
 if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
   gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs"
diff --git a/configure.ac b/configure.ac
index 85977482aee..33d4d775419 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1557,12 +1557,19 @@ AC_ARG_WITH(mpc-lib,
 if test "x$with_mpc" != x; then
   gmplibs="-L$with_mpc/lib $gmplibs"
   gmpinc="-I$with_mpc/include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpc_include" != x; then
   gmpinc="-I$with_mpc_include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}/include"; then
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpc_lib" != x; then
   gmplibs="-L$with_mpc_lib $gmplibs"
+elif test "x${prefix}" != "x" && test -d "${prefix}/lib"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
 fi
 if test "x$with_mpc$with_mpc_include$with_mpc_lib" = x && test -d ${srcdir}/mpc; then
   gmplibs='-L$$r/$(HOST_SUBDIR)/mpc/src/'"$lt_cv_objdir $gmplibs"
@@ -1591,12 +1598,19 @@ AC_ARG_WITH(mpfr-lib,
 if test "x$with_mpfr" != x; then
   gmplibs="-L$with_mpfr/lib $gmplibs"
   gmpinc="-I$with_mpfr/include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpfr_include" != x; then
   gmpinc="-I$with_mpfr_include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}/include"; then
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpfr_lib" != x; then
   gmplibs="-L$with_mpfr_lib $gmplibs"
+elif test "x${prefix}" != "x" && test -d "${prefix}/lib"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
 fi
 if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
   # MPFR v3.1.0 moved the sources into a src sub-directory.
@@ -1631,12 +1645,19 @@ AC_ARG_WITH(gmp-lib,
 if test "x$with_gmp" != x; then
   gmplibs="-L$with_gmp/lib $gmplibs"
   gmpinc="-I$with_gmp/include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_gmp_include" != x; then
   gmpinc="-I$with_gmp_include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}/include"; then
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_gmp_lib" != x; then
   gmplibs="-L$with_gmp_lib $gmplibs"
+elif test "x${prefix}" != "x" && test -d "${prefix}/lib"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
 fi
 if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
   gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs"

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PING][PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425]
  2022-06-02 15:53 [PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425] Eric Gallager
@ 2022-06-09 20:04 ` Eric Gallager
  2022-06-10 11:22   ` Xi Ruoyao
  2022-06-21  3:17   ` Alexandre Oliva
  2022-06-13 11:02 ` [PATCH][WIP] " Richard Biener
  1 sibling, 2 replies; 8+ messages in thread
From: Eric Gallager @ 2022-06-09 20:04 UTC (permalink / raw)
  To: gcc-patches; +Cc: Paolo Bonzini, neroden, aoliva, Ralf.Wildenhues

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

Hi, I'd like to ping this patch:
https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596126.html
(cc-ing the build machinery maintainers listed in MAINTAINERS this time)

On Thu, Jun 2, 2022 at 11:53 AM Eric Gallager <egall@gwmail.gwu.edu> wrote:
>
> So, I'm working on fixing PR bootstrap/44425, and have this patch to
> have the top-level configure script check in the value passed to
> `--prefix=` when looking for gmp/mpfr/mpc. It "works" (in that
> configuring with just `--prefix=` and none of
> `--with-gmp=`/`--with-mpfr=`/`--with-mpc=` now works where it failed
> before), but unfortunately it results in a bunch of duplicated
> `-I`/`-L` flags stuck in ${gmplibs} and ${gmpinc}... is that
> acceptable or should I try another approach?
> Eric

[-- Attachment #2: patch-configure.diff --]
[-- Type: application/octet-stream, Size: 5127 bytes --]

diff --git a/configure b/configure
index 5dcaab14ae9..8ad9a9f8392 100755
--- a/configure
+++ b/configure
@@ -7983,12 +7983,19 @@ fi
 if test "x$with_mpc" != x; then
   gmplibs="-L$with_mpc/lib $gmplibs"
   gmpinc="-I$with_mpc/include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpc_include" != x; then
   gmpinc="-I$with_mpc_include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}/include"; then
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpc_lib" != x; then
   gmplibs="-L$with_mpc_lib $gmplibs"
+elif test "x${prefix}" != "x" && test -d "${prefix}/lib"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
 fi
 if test "x$with_mpc$with_mpc_include$with_mpc_lib" = x && test -d ${srcdir}/mpc; then
   gmplibs='-L$$r/$(HOST_SUBDIR)/mpc/src/'"$lt_cv_objdir $gmplibs"
@@ -8024,12 +8031,19 @@ fi
 if test "x$with_mpfr" != x; then
   gmplibs="-L$with_mpfr/lib $gmplibs"
   gmpinc="-I$with_mpfr/include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpfr_include" != x; then
   gmpinc="-I$with_mpfr_include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}/include"; then
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpfr_lib" != x; then
   gmplibs="-L$with_mpfr_lib $gmplibs"
+elif test "x${prefix}" != "x" && test -d "${prefix}/lib"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
 fi
 if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
   # MPFR v3.1.0 moved the sources into a src sub-directory.
@@ -8070,12 +8084,19 @@ fi
 if test "x$with_gmp" != x; then
   gmplibs="-L$with_gmp/lib $gmplibs"
   gmpinc="-I$with_gmp/include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_gmp_include" != x; then
   gmpinc="-I$with_gmp_include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}/include"; then
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_gmp_lib" != x; then
   gmplibs="-L$with_gmp_lib $gmplibs"
+elif test "x${prefix}" != "x" && test -d "${prefix}/lib"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
 fi
 if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
   gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs"
diff --git a/configure.ac b/configure.ac
index 85977482aee..33d4d775419 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1557,12 +1557,19 @@ AC_ARG_WITH(mpc-lib,
 if test "x$with_mpc" != x; then
   gmplibs="-L$with_mpc/lib $gmplibs"
   gmpinc="-I$with_mpc/include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpc_include" != x; then
   gmpinc="-I$with_mpc_include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}/include"; then
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpc_lib" != x; then
   gmplibs="-L$with_mpc_lib $gmplibs"
+elif test "x${prefix}" != "x" && test -d "${prefix}/lib"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
 fi
 if test "x$with_mpc$with_mpc_include$with_mpc_lib" = x && test -d ${srcdir}/mpc; then
   gmplibs='-L$$r/$(HOST_SUBDIR)/mpc/src/'"$lt_cv_objdir $gmplibs"
@@ -1591,12 +1598,19 @@ AC_ARG_WITH(mpfr-lib,
 if test "x$with_mpfr" != x; then
   gmplibs="-L$with_mpfr/lib $gmplibs"
   gmpinc="-I$with_mpfr/include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpfr_include" != x; then
   gmpinc="-I$with_mpfr_include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}/include"; then
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_mpfr_lib" != x; then
   gmplibs="-L$with_mpfr_lib $gmplibs"
+elif test "x${prefix}" != "x" && test -d "${prefix}/lib"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
 fi
 if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
   # MPFR v3.1.0 moved the sources into a src sub-directory.
@@ -1631,12 +1645,19 @@ AC_ARG_WITH(gmp-lib,
 if test "x$with_gmp" != x; then
   gmplibs="-L$with_gmp/lib $gmplibs"
   gmpinc="-I$with_gmp/include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_gmp_include" != x; then
   gmpinc="-I$with_gmp_include $gmpinc"
+elif test "x${prefix}" != "x" && test -d "${prefix}/include"; then
+  gmpinc="-I${prefix}/include $gmpinc"
 fi
 if test "x$with_gmp_lib" != x; then
   gmplibs="-L$with_gmp_lib $gmplibs"
+elif test "x${prefix}" != "x" && test -d "${prefix}/lib"; then
+  gmplibs="-L${prefix}/lib $gmplibs"
 fi
 if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
   gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs"

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PING][PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425]
  2022-06-09 20:04 ` [PING][PATCH][WIP] " Eric Gallager
@ 2022-06-10 11:22   ` Xi Ruoyao
  2022-06-11 14:23     ` Eric Gallager
  2022-06-21  3:17   ` Alexandre Oliva
  1 sibling, 1 reply; 8+ messages in thread
From: Xi Ruoyao @ 2022-06-10 11:22 UTC (permalink / raw)
  To: Eric Gallager, gcc-patches; +Cc: Paolo Bonzini, aoliva, neroden

On Thu, 2022-06-09 at 16:04 -0400, Eric Gallager via Gcc-patches wrote:
> Hi, I'd like to ping this patch:
> https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596126.html
> (cc-ing the build machinery maintainers listed in MAINTAINERS this
> time)
> 
> On Thu, Jun 2, 2022 at 11:53 AM Eric Gallager <egall@gwmail.gwu.edu>
> wrote:
> > 
> > So, I'm working on fixing PR bootstrap/44425, and have this patch to
> > have the top-level configure script check in the value passed to
> > `--prefix=` when looking for gmp/mpfr/mpc. It "works" (in that
> > configuring with just `--prefix=` and none of
> > `--with-gmp=`/`--with-mpfr=`/`--with-mpc=` now works where it failed
> > before), but unfortunately it results in a bunch of duplicated
> > `-I`/`-L` flags stuck in ${gmplibs} and ${gmpinc}... is that
> > acceptable or should I try another approach?
> > Eric

A patch should not edit configure directly.  configure.ac should be
edited and configure should be regenerated from it.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PING][PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425]
  2022-06-10 11:22   ` Xi Ruoyao
@ 2022-06-11 14:23     ` Eric Gallager
  0 siblings, 0 replies; 8+ messages in thread
From: Eric Gallager @ 2022-06-11 14:23 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: gcc-patches, Paolo Bonzini, aoliva, neroden

On Fri, Jun 10, 2022 at 7:22 AM Xi Ruoyao <xry111@xry111.site> wrote:
>
> On Thu, 2022-06-09 at 16:04 -0400, Eric Gallager via Gcc-patches wrote:
> > Hi, I'd like to ping this patch:
> > https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596126.html
> > (cc-ing the build machinery maintainers listed in MAINTAINERS this
> > time)
> >
> > On Thu, Jun 2, 2022 at 11:53 AM Eric Gallager <egall@gwmail.gwu.edu>
> > wrote:
> > >
> > > So, I'm working on fixing PR bootstrap/44425, and have this patch to
> > > have the top-level configure script check in the value passed to
> > > `--prefix=` when looking for gmp/mpfr/mpc. It "works" (in that
> > > configuring with just `--prefix=` and none of
> > > `--with-gmp=`/`--with-mpfr=`/`--with-mpc=` now works where it failed
> > > before), but unfortunately it results in a bunch of duplicated
> > > `-I`/`-L` flags stuck in ${gmplibs} and ${gmpinc}... is that
> > > acceptable or should I try another approach?
> > > Eric
>
> A patch should not edit configure directly.  configure.ac should be
> edited and configure should be regenerated from it.
>

That is precisely what the patch does: it edits configure.ac and
regenerates configure from it.

> --
> Xi Ruoyao <xry111@xry111.site>
> School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425]
  2022-06-02 15:53 [PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425] Eric Gallager
  2022-06-09 20:04 ` [PING][PATCH][WIP] " Eric Gallager
@ 2022-06-13 11:02 ` Richard Biener
  2022-06-13 14:27   ` Eric Gallager
  1 sibling, 1 reply; 8+ messages in thread
From: Richard Biener @ 2022-06-13 11:02 UTC (permalink / raw)
  To: Eric Gallager; +Cc: gcc-patches

On Thu, Jun 2, 2022 at 5:54 PM Eric Gallager via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> So, I'm working on fixing PR bootstrap/44425, and have this patch to
> have the top-level configure script check in the value passed to
> `--prefix=` when looking for gmp/mpfr/mpc. It "works" (in that
> configuring with just `--prefix=` and none of
> `--with-gmp=`/`--with-mpfr=`/`--with-mpc=` now works where it failed
> before), but unfortunately it results in a bunch of duplicated
> `-I`/`-L` flags stuck in ${gmplibs} and ${gmpinc}... is that
> acceptable or should I try another approach?

--prefix is documented as to be used for installing (architecture
independent) files,
I'm not sure it is a good idea to probe that for gmp/mpfr/mpc installs used for
the host.

Richard.

> Eric

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425]
  2022-06-13 11:02 ` [PATCH][WIP] " Richard Biener
@ 2022-06-13 14:27   ` Eric Gallager
  2022-06-14 13:14     ` Richard Biener
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Gallager @ 2022-06-13 14:27 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches

On Mon, Jun 13, 2022 at 7:02 AM Richard Biener
<richard.guenther@gmail.com> wrote:
>
> On Thu, Jun 2, 2022 at 5:54 PM Eric Gallager via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
> >
> > So, I'm working on fixing PR bootstrap/44425, and have this patch to
> > have the top-level configure script check in the value passed to
> > `--prefix=` when looking for gmp/mpfr/mpc. It "works" (in that
> > configuring with just `--prefix=` and none of
> > `--with-gmp=`/`--with-mpfr=`/`--with-mpc=` now works where it failed
> > before), but unfortunately it results in a bunch of duplicated
> > `-I`/`-L` flags stuck in ${gmplibs} and ${gmpinc}... is that
> > acceptable or should I try another approach?
>
> --prefix is documented as to be used for installing (architecture
> independent) files,
> I'm not sure it is a good idea to probe that for gmp/mpfr/mpc installs used for
> the host.
>
> Richard.
>
> > Eric

So... I guess that means we should close bug 44425 as INVALID or
WONTFIX then? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44425

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425]
  2022-06-13 14:27   ` Eric Gallager
@ 2022-06-14 13:14     ` Richard Biener
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Biener @ 2022-06-14 13:14 UTC (permalink / raw)
  To: Eric Gallager; +Cc: gcc-patches

On Mon, Jun 13, 2022 at 4:27 PM Eric Gallager <egall@gwmail.gwu.edu> wrote:
>
> On Mon, Jun 13, 2022 at 7:02 AM Richard Biener
> <richard.guenther@gmail.com> wrote:
> >
> > On Thu, Jun 2, 2022 at 5:54 PM Eric Gallager via Gcc-patches
> > <gcc-patches@gcc.gnu.org> wrote:
> > >
> > > So, I'm working on fixing PR bootstrap/44425, and have this patch to
> > > have the top-level configure script check in the value passed to
> > > `--prefix=` when looking for gmp/mpfr/mpc. It "works" (in that
> > > configuring with just `--prefix=` and none of
> > > `--with-gmp=`/`--with-mpfr=`/`--with-mpc=` now works where it failed
> > > before), but unfortunately it results in a bunch of duplicated
> > > `-I`/`-L` flags stuck in ${gmplibs} and ${gmpinc}... is that
> > > acceptable or should I try another approach?
> >
> > --prefix is documented as to be used for installing (architecture
> > independent) files,
> > I'm not sure it is a good idea to probe that for gmp/mpfr/mpc installs used for
> > the host.
> >
> > Richard.
> >
> > > Eric
>
> So... I guess that means we should close bug 44425 as INVALID or
> WONTFIX then? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44425

That would be my reaction, yes.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PING][PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425]
  2022-06-09 20:04 ` [PING][PATCH][WIP] " Eric Gallager
  2022-06-10 11:22   ` Xi Ruoyao
@ 2022-06-21  3:17   ` Alexandre Oliva
  1 sibling, 0 replies; 8+ messages in thread
From: Alexandre Oliva @ 2022-06-21  3:17 UTC (permalink / raw)
  To: Eric Gallager; +Cc: gcc-patches, Paolo Bonzini, neroden, Ralf.Wildenhues

Hello, Eric,

On Jun  9, 2022, Eric Gallager <egall@gwmail.gwu.edu> wrote:

> (cc-ing the build machinery maintainers listed in MAINTAINERS this time)

Thanks, I'd missed it the first time.

> On Thu, Jun 2, 2022 at 11:53 AM Eric Gallager <egall@gwmail.gwu.edu> wrote:

>> So, I'm working on fixing PR bootstrap/44425, and have this patch to
>> have the top-level configure script check in the value passed to
>> `--prefix=` when looking for gmp/mpfr/mpc. It "works" (in that
>> configuring with just `--prefix=` and none of
>> `--with-gmp=`/`--with-mpfr=`/`--with-mpc=` now works where it failed
>> before), but unfortunately it results in a bunch of duplicated
>> `-I`/`-L` flags stuck in ${gmplibs} and ${gmpinc}... is that
>> acceptable or should I try another approach?

I wonder if it would make sense to add -L${libdir} and -I${includedir}
to host flags.  It would obviate the explicit flag-setting for each of
the libs, and it would address the apparent double-setting when prefix
is set, or confusingly partial overrides when --with-*-include and
--with-*-lib are used.

It would be IMHO preferrable to use libdir and includedir, rather than
prefix, especially for cases in which exec_prefix != prefix, but takes
some work for libdir and includedir to be expanded correctly during
configure.  E.g., libdir is normally set to ${exec_prefix}/lib, and
exec_prefix defaults to ${prefix}, but a shell won't expand multiple
layers of macros like make does, so configure needs some help with that.

-- 
Alexandre Oliva, happy hacker                https://FSFLA.org/blogs/lxo/
   Free Software Activist                       GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about <https://stallmansupport.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-06-21  3:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 15:53 [PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425] Eric Gallager
2022-06-09 20:04 ` [PING][PATCH][WIP] " Eric Gallager
2022-06-10 11:22   ` Xi Ruoyao
2022-06-11 14:23     ` Eric Gallager
2022-06-21  3:17   ` Alexandre Oliva
2022-06-13 11:02 ` [PATCH][WIP] " Richard Biener
2022-06-13 14:27   ` Eric Gallager
2022-06-14 13:14     ` Richard Biener

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).