diff mbox

[build] PR 46540 - add --disable-libquadmath/--disable-libquadmath-support

Message ID 4CFBF72D.8050904@net-b.de
State New
Headers show

Commit Message

Tobias Burnus Dec. 5, 2010, 8:33 p.m. UTC
Tobias Burnus wrote:
> H.J. Lu wrote:
>> On Sat, Dec 4, 2010 at 8:15 AM, Tobias Burnus<burnus@net-b.de>  wrote:
>>> This patch adds two configure options:
>>> --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
+
+

Comments

Matthias Klose Dec. 6, 2010, 1:30 a.m. UTC | #1
On 05.12.2010 21:33, Tobias Burnus wrote:
> Tobias Burnus wrote:
>> H.J. Lu wrote:
>>> On Sat, Dec 4, 2010 at 8:15 AM, Tobias Burnus<burnus@net-b.de> wrote:
>>>> This patch adds two configure options:
>>>> --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
diff mbox

Patch

2010-12-05  Tobias Burnus  <burnus@net-b.de>

	PR fortran/46540
	* doc/install.texi: Document --disable-libquadmath an
	--disable-libquadmath-support

diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index fbb2d4c..abe80aa 100644
--- 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.
 
+@item --disable-libquadmath
+Specify that the GCC quad-precision math library should not be build.
+On some systems, the library is required to be linkable when building
+the Fortran front end, unless @option{--disable-libquadmath-support}
+is used.
+
+@item --disable-libquadmath-support
+Specify that the Fortran front end and @code{libgfortran} do not add
+support for @code{libquadmath} on systems supporting it.
+
 @item --disable-libgomp
 Specify that the run-time libraries used by GOMP should not be built.