public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/56259] New: GCC's configure script has a hard-coded setting of 'with_gmp' for FreeBSD
@ 2013-02-08 23:02 novulae at hotmail dot com
  2013-02-10 12:25 ` [Bug bootstrap/56259] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: novulae at hotmail dot com @ 2013-02-08 23:02 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56259

             Bug #: 56259
           Summary: GCC's configure script has a hard-coded setting of
                    'with_gmp' for FreeBSD
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: novulae@hotmail.com


This block of code exists in the configure script for GCC:

  *-*-freebsd*)
    if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
        && test -f /usr/local/include/gmp.h; then
      with_gmp=/usr/local
    fi
    ;;


This has several serious side-effects:

 - If you have GMP in the source directory you're using to build GCC, it will
   be ignored.
 - Since --with-gmp=/usr/local wasn't specified to configure, this setting is
   not propagated to MPFR and MPC, which causes those configurations to fail.
 - Overriding with --with-gmp-include and --with-gmp-libs causes MPFR and GMP
   to be linked dynamically with GCC, instead of statically (which is the case
   when GMP, MPFR and MPC are built from source as part of GCC.



I don't believe this block of code has any place here - configure has
--with-gmp which can be used to do this exact same thing, and correctly to
boot. The section of code where this entry occurs is used to set noconfigdirs
for other platforms, and most platforms have nothing being done at all.

For greater context:
  *-*-darwin*)
    noconfigdirs="$noconfigdirs ld gas gdb gprof"
    noconfigdirs="$noconfigdirs sim target-rda"
    ;;
  *-*-dragonfly*)
    ;;
  *-*-freebsd*)
    if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
        && test -f /usr/local/include/gmp.h; then
      with_gmp=/usr/local
    fi
    ;;
  *-*-kaos*)
    # Remove unsupported stuff on all kaOS configurations.
    noconfigdirs="$noconfigdirs target-libgloss"
    ;;
  *-*-netbsd*)
    ;;
  *-*-netware*)
    ;;


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

* [Bug bootstrap/56259] GCC's configure script has a hard-coded setting of 'with_gmp' for FreeBSD
  2013-02-08 23:02 [Bug bootstrap/56259] New: GCC's configure script has a hard-coded setting of 'with_gmp' for FreeBSD novulae at hotmail dot com
@ 2013-02-10 12:25 ` rguenth at gcc dot gnu.org
  2013-02-18 22:25 ` ljrittle at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-10 12:25 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56259

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-02-10
                 CC|                            |ljrittle at acm dot org
               Host|                            |*-*-freebsd*
            Version|unknown                     |4.7.2
     Ever Confirmed|0                           |1
      Known to fail|                            |4.6.2, 4.7.2, 4.8.0

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-10 12:24:48 UTC ---
Confirmed.  This should be removed.


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

* [Bug bootstrap/56259] GCC's configure script has a hard-coded setting of 'with_gmp' for FreeBSD
  2013-02-08 23:02 [Bug bootstrap/56259] New: GCC's configure script has a hard-coded setting of 'with_gmp' for FreeBSD novulae at hotmail dot com
  2013-02-10 12:25 ` [Bug bootstrap/56259] " rguenth at gcc dot gnu.org
@ 2013-02-18 22:25 ` ljrittle at gcc dot gnu.org
  2013-02-20  1:47 ` novulae at hotmail dot com
  2021-08-16 23:15 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ljrittle at gcc dot gnu.org @ 2013-02-18 22:25 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56259

Loren Rittle <ljrittle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ljrittle at gcc dot gnu.org

--- Comment #2 from Loren Rittle <ljrittle at gcc dot gnu.org> 2013-02-18 22:25:27 UTC ---
This block of code was added to handle a special case seen on FreeBSD:
(a) on some versions of FreeBSD circa 2004, the system installed copy of gmp.h
was too old to support gcc
(b) by default, FreeBSD ports system installs into /usr/local

I note that the claimed serious side effects only happen when one installed gmp
from ports (or otherwise installed it into /usr/local) *and* one attempted to
build a gcc with a copy of gmp co-located with gcc source.

We need to think about the default user (which will likely not unpack gmp, mpfr
and mpc) into the gcc source tree.

We would need input from Gerald (assuming he still supports the official
FreeBSD ports builds of gcc).  Blinding accepting a patch to remove this block
of configuration will likely break this downstream; even if it otherwise makes
logical sense to do so.

Regards,
Loren


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

* [Bug bootstrap/56259] GCC's configure script has a hard-coded setting of 'with_gmp' for FreeBSD
  2013-02-08 23:02 [Bug bootstrap/56259] New: GCC's configure script has a hard-coded setting of 'with_gmp' for FreeBSD novulae at hotmail dot com
  2013-02-10 12:25 ` [Bug bootstrap/56259] " rguenth at gcc dot gnu.org
  2013-02-18 22:25 ` ljrittle at gcc dot gnu.org
@ 2013-02-20  1:47 ` novulae at hotmail dot com
  2021-08-16 23:15 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: novulae at hotmail dot com @ 2013-02-20  1:47 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56259

--- Comment #3 from Caleb Sunstrum <novulae at hotmail dot com> 2013-02-20 01:47:02 UTC ---
(In reply to comment #2)
> This block of code was added to handle a special case seen on FreeBSD:
> (a) on some versions of FreeBSD circa 2004, the system installed copy of gmp.h
> was too old to support gcc
> (b) by default, FreeBSD ports system installs into /usr/local

Is there a reason why /path/to/gcc-source/configure --with-gmp=/usr/local
doesn't work? I don't have access to these older FreeBSDs, so I can't comment.

> 
> I note that the claimed serious side effects only happen when one installed gmp
> from ports (or otherwise installed it into /usr/local) *and* one attempted to
> build a gcc with a copy of gmp co-located with gcc source.

At the very least, this hack should propagate the settings downstream to mpfr
and mpc. But since --with-gmp=/usr/local will (should) do the same thing, I
don't see why it's necessary.

> 
> We need to think about the default user (which will likely not unpack gmp, mpfr
> and mpc) into the gcc source tree.

While I agree the default use case is important, I think it's more important to
note that there is nothing to suggest that this hack in play, and diagnosing
the failures + the unexpected side effects is quite difficult to do. I only
noticed this when trying to figure out why MPFR and MPC were failing to build
with GMP and tracing through the configure script.

Conversely, if no --with-gmp is specified and the default GMP is too old, one
could add additional text to the warning when configure fails - stating that
the GMP found in the default location is too old, and they may wish to specify
--with-gmp=/usr/local (if GMP exists there), or to build GMP from source as
part of GCC.


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

* [Bug bootstrap/56259] GCC's configure script has a hard-coded setting of 'with_gmp' for FreeBSD
  2013-02-08 23:02 [Bug bootstrap/56259] New: GCC's configure script has a hard-coded setting of 'with_gmp' for FreeBSD novulae at hotmail dot com
                   ` (2 preceding siblings ...)
  2013-02-20  1:47 ` novulae at hotmail dot com
@ 2021-08-16 23:15 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-16 23:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56259

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2013-02-10 00:00:00         |2021-8-16
           Keywords|                            |build

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Still there today:
  *-*-freebsd*)
    if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
        && ! test -d ${srcdir}/gmp \
        && test -f /usr/local/include/gmp.h; then
      with_gmp=/usr/local
    fi
    ;;

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

end of thread, other threads:[~2021-08-16 23:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-08 23:02 [Bug bootstrap/56259] New: GCC's configure script has a hard-coded setting of 'with_gmp' for FreeBSD novulae at hotmail dot com
2013-02-10 12:25 ` [Bug bootstrap/56259] " rguenth at gcc dot gnu.org
2013-02-18 22:25 ` ljrittle at gcc dot gnu.org
2013-02-20  1:47 ` novulae at hotmail dot com
2021-08-16 23:15 ` pinskia at gcc dot gnu.org

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