public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/47196] New: --disable-libquadmath breaks bootstrap in libgfortran (quadmath_weak.h not found)
@ 2011-01-06 23:36 dfranke at gcc dot gnu.org
  2011-01-07  9:06 ` [Bug libfortran/47196] " burnus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dfranke at gcc dot gnu.org @ 2011-01-06 23:36 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: --disable-libquadmath breaks bootstrap in libgfortran
                    (quadmath_weak.h not found)
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dfranke@gcc.gnu.org
                CC: burnus@gcc.gnu.org
              Host: i686-pc-linux-gnu


Configuring as:
$> ../configure --prefix=[...] --program-suffix=-svn --with-system-zlib
--enable-bootstrap --enable-threads=posix --enable-shared
--enable-version-specific-runtime-libs --enable-languages=c,c++,fortran
--disable-maintainer-mode --disable-nls --disable-libmudflap
--disable-libquadmath

Ends with:
$> make bootstrap
[...]
In file included from /home/daniel/svn/gcc-svn/libgfortran/fmain.c:4:0:
/home/daniel/svn/gcc-svn/libgfortran/libgfortran.h:52:29: fatal error:
quadmath_weak.h: No such file or directory


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

* [Bug libfortran/47196] --disable-libquadmath breaks bootstrap in libgfortran (quadmath_weak.h not found)
  2011-01-06 23:36 [Bug bootstrap/47196] New: --disable-libquadmath breaks bootstrap in libgfortran (quadmath_weak.h not found) dfranke at gcc dot gnu.org
@ 2011-01-07  9:06 ` burnus at gcc dot gnu.org
  2011-01-07 12:47 ` dfranke at gcc dot gnu.org
  2011-01-07 13:41 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-07  9:06 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|bootstrap                   |libfortran
         Resolution|                            |WONTFIX

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-07 08:52:01 UTC ---
I would suggest that you read the libquadmath related part of
http://gcc.gnu.org/install/configure.html

If you do not want to use libquadmath in libgfortran, build with
--disable-libquadmath-support -- or supply a system version of libquadmath
library/header files. Whether libquadmath is build (as part of GCC) is
independent from whether Fortran (gfortran, libgfortran) uses libquadmath or
not. This allows for the following four combination:

a) Build libquadmath and Fortran with libquadmath-based REAL(16) support
   (default on systems where __float128 is supported)

b) Build neither libquadmath nor libquadmath-based REAL(16) support
   (obviously the default on systems lacking __float128 support;
   Other use: Save a few kilobytes by having one library less)

c) Build libquadmath but no Fortran REAL(16) support
   If one wants to save a few KiB for Fortran but wants to us libquadmath, e.g,
   with C/C++

d) Don't build libquadmath, but support libquadmath-based REAL(16) in gfortran
   Useful only if the system has already a (compatible) libquadmath
installation
   libgfortran then links "-lquadmath" but the user/builder has to make sure
that
   it is in the -I and the -L paths.


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

* [Bug libfortran/47196] --disable-libquadmath breaks bootstrap in libgfortran (quadmath_weak.h not found)
  2011-01-06 23:36 [Bug bootstrap/47196] New: --disable-libquadmath breaks bootstrap in libgfortran (quadmath_weak.h not found) dfranke at gcc dot gnu.org
  2011-01-07  9:06 ` [Bug libfortran/47196] " burnus at gcc dot gnu.org
@ 2011-01-07 12:47 ` dfranke at gcc dot gnu.org
  2011-01-07 13:41 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dfranke at gcc dot gnu.org @ 2011-01-07 12:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Daniel Franke <dfranke at gcc dot gnu.org> 2011-01-07 12:44:17 UTC ---
(In reply to comment #1)
> c) Build libquadmath but no Fortran REAL(16) support
>    If one wants to save a few KiB for Fortran but wants to us libquadmath,
>    e.g, with C/C++

This would be 

    --enable-libquadmath --disable-libquadmath-support    ?

Why should disable-libquadmath-support affect Fortran only (besides that the
docs say so)? I'd read this as "build libquadmath, but disable any usage within
gcc".


> d) Don't build libquadmath, but support libquadmath-based REAL(16) in gfortran
>    Useful only if the system has already a (compatible) libquadmath 
>    installation libgfortran then links "-lquadmath" but the user/builder has
>    to make sure that it is in the -I and the -L paths.

I think it would make much more sense to set the the libquadmath-support flag
implicitly in most cases, i.e. instead of the currently necessary

   --disable-libquadmath --disable-libquadmath-support

a simple

   --disable-libquadmath

to turn off everything related to libquadmath would do. If one does not want to
build libquadmath of gcc but have libquadmath support for any(!) language,
library and headers to be user supplied, then use

  --disable-libquadmath --enable-libquadmath-support

to override the implicit setting of --enable-libquadmath-support.

Wouldn't that be much more intuitive and easier for the users?


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

* [Bug libfortran/47196] --disable-libquadmath breaks bootstrap in libgfortran (quadmath_weak.h not found)
  2011-01-06 23:36 [Bug bootstrap/47196] New: --disable-libquadmath breaks bootstrap in libgfortran (quadmath_weak.h not found) dfranke at gcc dot gnu.org
  2011-01-07  9:06 ` [Bug libfortran/47196] " burnus at gcc dot gnu.org
  2011-01-07 12:47 ` dfranke at gcc dot gnu.org
@ 2011-01-07 13:41 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-07 13:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-07 13:16:48 UTC ---
(In reply to comment #2)
> (In reply to comment #1)
> > c) Build libquadmath but no Fortran REAL(16) support
> This would be 
>     --enable-libquadmath --disable-libquadmath-support    ?

Yes - though "--enable-libquadmath" is the default and stating it explicitly
wouldn't help on systems which don't have __float128.

> Why should disable-libquadmath-support affect Fortran only (besides that the
> docs say so)?

Because only gfortran (gcc/fortran) and libgfortran/ use this flag. For them
the effect is:
(a) gcc/fortran: Provide a REAL(16) type based on __float128 (TF_MODE) and call
a special libgfortran function for I/O using those types.
(b) libgfortran: Support I/O and some moth functions for __float128 and link
libquadmath.

> I'd read this as "build libquadmath, but disable any usage within gcc"

Well, for C/C++ one does not need a special compiler support: C does not have a
build-in math but one needs to do all the linking and header inclusion
manually. Contrary to Fortran, where the Fortran library does some of the duty
and "COS" is a generic function which takes all kinds of real/complex
arguments.

Thus, for C the library just needs to be compiled and installed - then one can
use it as described at http://gcc.gnu.org/onlinedocs/libquadmath/ (see example
in the "I/O Library Routines" section).

I think for Ada one might need to do something similar, possibly also for Java
and other FE - but currently, Fortran is the only FE+FE-library which uses
libquadmath. Thus, --disable-libquadmath-support currently only applies to
Fortran.

> > d) Don't build libquadmath, but support libquadmath-based REAL(16)
> >    in gfortran
> >    Useful only if the system has already a (compatible) libquadmath 
> >    installation libgfortran then links "-lquadmath" but the user/builder has
> >    to make sure that it is in the -I and the -L paths.
> 
> I think it would make much more sense to set the the libquadmath-support flag
> implicitly in most cases

Well, you assume that the most common case is that one builds Fortran on a
__float128 supporting system but does not want to have REAL(16) support.

I think such a usage is the exception and thus it does not really matter
whether one has to specify only --disable-libquadmath or also
--disable-libquadmath-support.

> Wouldn't that be much more intuitive and easier for the users?

Yes and no. It would be more intuitive to users which do not want to have
libquadmath support in Fortran, but otherwise implicit swapping of defaults is
less intuitive.

At least it is such a special usage with unclear benefit that I won't work on a
patch. But feel free to create one, send it to gcc-patches@ and ask for
build-maintainers' approval.


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

end of thread, other threads:[~2011-01-07 13:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-06 23:36 [Bug bootstrap/47196] New: --disable-libquadmath breaks bootstrap in libgfortran (quadmath_weak.h not found) dfranke at gcc dot gnu.org
2011-01-07  9:06 ` [Bug libfortran/47196] " burnus at gcc dot gnu.org
2011-01-07 12:47 ` dfranke at gcc dot gnu.org
2011-01-07 13:41 ` burnus 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).