Discussion:
[Patch,build] PR 46540 - add --disable-libquadmath/--disable-libquadmath-support
Tobias Burnus
2010-12-04 16:15:36 UTC
Permalink
This patch adds two configure options:

--disable-libquadmath
which disables the libquadmath build (e.g. to use the system's
libquadmath)

--disable-libquadmath-support
which disables the __float128/libquadmath support in gcc/fortran
and in libgfortran

I did some initial tests with the patch; I will do some more regtests.

OK for committal?

Tobias

PS: I will document the options in install.html after committal.
H.J. Lu
2010-12-04 16:20:30 UTC
Permalink
Post by Tobias Burnus
--disable-libquadmath
   which disables the libquadmath build (e.g. to use the system's
libquadmath)
This isn't very clear. We already have --with-system-zlib, why not
--with-system-libquadmath?
Post by Tobias Burnus
--disable-libquadmath-support
   which disables the __float128/libquadmath support in gcc/fortran and in
libgfortran
I did some initial tests with the patch; I will do some more regtests.
OK for committal?
--
H.J.
Tobias Burnus
2010-12-04 16:31:10 UTC
Permalink
Post by H.J. Lu
Post by Tobias Burnus
--disable-libquadmath
which disables the libquadmath build (e.g. to use the system's
libquadmath)
This isn't very clear. We already have --with-system-zlib, why not
--with-system-libquadmath?
I think that's better - I will update the patch.

Additionally, I saw that I attached the wrong version of the patch
(missed a file, the changelog and had a spurious addition). The correct
one is attached.

Tobias
Tobias Burnus
2010-12-05 20:33:49 UTC
Permalink
Post by H.J. Lu
Post by Tobias Burnus
--disable-libquadmath
which disables the libquadmath build (e.g. to use the system's
libquadmath)
This isn't very clear. We already have --with-system-zlib, why not
--with-system-libquadmath?
Well, we also have: --enable-libada and --enable-libssp.

I have now used --with-system-libquadmath but I have to admit I find it
much more misleading. --disable-libquadmath does that the option was
stating: It does not build "libquadmath".

--with-system-libquadmath somehow implies that the system *has* to
provide libquadmath - which is not (generally) true. It is just not
build. -- Only if you build the Fortran front end on a system which
supports __float128 and you did not disable the support using
--disable-libquadmath-support, you have to provide libquadmath such that
it is in the include ("-I") and library ("-L") path.

For the case you only build, e.g., C or C++ the option
--without-system-libquadmath implies that the library is build and
--with-system-libquadmath (default on systems supporting it) implies
that the library is not build (note: a system library is not needed) --
which I find much more confusing. Or if I want to build on x86-64
Fortran without quadmath support and without the library, the options
you have to use are: --disable-libquadmath-support
--with-system-libquadmath -- which somehow looks strange.


The attached patch has been a couple of times in different variants
bootstrapped on x86-64-linux.
OK for the trunk?

(For the variant with --disable-libquadmath, cf. patch snippet below.)

Tobias

PS: I have included a patch for "gcc/doc/install.html" (describing
--disable-libquadmath[-support]).

PPS: A variant would for --(disable|enable)-libquadmath:

+AC_ARG_ENABLE(libquadmath,
+[ --disable-libquadmath do not build libquadmath directory],
+ENABLE_LIBQUADMATH=$enableval,
+ENABLE_LIBQUADMATH=yes)
+if test "${ENABLE_LIBQUADMATH}" = "no" ; then
+ noconfigdirs="$noconfigdirs target-libquadmath"
+fi
+
+
Matthias Klose
2010-12-06 01:30:03 UTC
Permalink
Post by Tobias Burnus
Post by Tobias Burnus
--disable-libquadmath
which disables the libquadmath build (e.g. to use the system's
libquadmath)
This isn't very clear. We already have --with-system-zlib, why not
--with-system-libquadmath?
Well, we also have: --enable-libada and --enable-libssp.
I have now used --with-system-libquadmath but I have to admit I find it much
more misleading. --disable-libquadmath does that the option was stating: It does
not build "libquadmath".
and --with-system-libquadmath implies that there is an externally available
release of libquadmath, which I at least cannot find. I think the option
renaming is misleading.

Matthias
Tobias Burnus
2010-12-08 23:36:53 UTC
Permalink
Updated patch (relative to
http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00419.html).

Changes:
- Use (again!) --disable-libquadmath-support
- Use AS_HELP_STRING

OK for the trunk?

Tobias
Ralf Wildenhues
2010-12-09 22:33:47 UTC
Permalink
Post by Tobias Burnus
Updated patch (relative to
http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00419.html).
- Use (again!) --disable-libquadmath-support
- Use AS_HELP_STRING
OK for the trunk?
OK with nits addressed.

Thanks,
Ralf
Post by Tobias Burnus
/
PR fortran/46540
* configure.ac: Add --disable-libquadmath and
--disable-libquadmath-support.
* configure: Regenerate.
This needs syncing to src.
Post by Tobias Burnus
gcc/
PR fortran/46540
* configure.ac: Handle --disable-libquadmath-support.
* doc/install.texi: Document --disable-libquadmath and
--disable-libquadmath-support
* configure: Regenerate.
* config.in: Regenerate.
gcc/fortran/
PR fortran/46540
* trans-types.c (gfc_init_kinds): Handle
--disable-libquadmath-support.
libgfortran/
PR fortran/46540
* acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Honour
--disable-libquadmath-support.
* configure.ac: Handle --disable-libquadmath-support.
* configure: Regenerate.
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4781,6 +4781,18 @@ if test x"$enable_plugin" = x"yes"; then
AC_DEFINE(ENABLE_PLUGIN, 1, [Define to enable plugin support.])
fi
+
+AC_ARG_ENABLE(libquadmath-support,
+AS_HELP_STRING([--disable-libquadmath-support],
+ [disable libquadmath support for Fortran]),
+ENABLE_LIBQUADMATH_SUPPORT=$enableval,
+ENABLE_LIBQUADMATH_SUPPORT=yes)
+if test "${ENABLE_LIBQUADMATH_SUPPORT}" != "no" ; then
+ AC_DEFINE(USE_LIBQUADMATH_SUPPORT, 1,
Is there a specific reason you don't use ENABLE_LIBQUADMATH_SUPPORT also
as the name of the define? There is precedent. (Your choice though.)
trans-types.c would need adjusting, of course.
Post by Tobias Burnus
+ [Define to 1 to enable libquadmath support])
+fi
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -1337,6 +1337,16 @@ do a @samp{make -C gcc gnatlib_and_tools}.
Specify that the run-time libraries for stack smashing protection
should not be built.
+Specify that the GCC quad-precision math library should not be build.
built
Post by Tobias Burnus
+On some systems, the library is required to be linkable when building
+is used.
+
+
Tobias Burnus
2010-12-10 12:56:28 UTC
Permalink
Post by Ralf Wildenhues
Post by Tobias Burnus
OK for the trunk?
OK with nits addressed.
Thanks for the review. The committal to "src" was done by bonzini, who
did it before I could even update my "src" checkout. (Anonymous "cvs up"
failed with "Service temporarily unavailable" due to this morning's DoS
attack.)

Tobias

Loading...