diff mbox series

doc: extend --{enable,disable}-libsanitizer description [PR 105614]

Message ID c92b41f5883f997abc5dad5aee37c4a87edeb06d.camel@xry111.site
State New
Headers show
Series doc: extend --{enable,disable}-libsanitizer description [PR 105614] | expand

Commit Message

Xi Ruoyao June 30, 2022, 10:34 a.m. UTC
A documentation improvement with no code change.  OK for trunk?

-- >8 --

We are receiving several reports that people are (mis)using
--enable-libsanitizer option, which was not documented by GCC
installation doc.  It forces to build libsanitizer even for unsupported
targets, causing build failure.  Extend the --disable-libsanitizer
description to also include --enable-libsanitizer, and warn about the
possible consequences if it's enabled explicitly.

gcc/ChangeLog:

	PR sanitizer/105614
	* doc/install.texi: Document --enable-libsanitizer and possible
	consequences.
---
 gcc/doc/install.texi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Rainer Orth June 30, 2022, 11:54 a.m. UTC | #1
Hi Xi,

> A documentation improvement with no code change.  OK for trunk?
>
> -- >8 --
>
> We are receiving several reports that people are (mis)using
> --enable-libsanitizer option, which was not documented by GCC
> installation doc.  It forces to build libsanitizer even for unsupported
> targets, causing build failure.  Extend the --disable-libsanitizer
> description to also include --enable-libsanitizer, and warn about the
> possible consequences if it's enabled explicitly.

this behaviour isn't specific to libsanitizer at all: it probably
pertains to every target library using configure.tgt (libatomic,
libgomp, libitm, liboffloadmic, libphobos, libsanitizer, libvtv).  I
think it should be documented in a more generic way.

> gcc/ChangeLog:
>
> 	PR sanitizer/105614
> 	* doc/install.texi: Document --enable-libsanitizer and possible
> 	consequences.

It's better to specific which part of install.texi is affected.  In this
case, this would be

	* doc/install.texi (Configuration, --disable-libsanitizer): ...

Thanks.
	Rainer
diff mbox series

Patch

diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 460da3a0fd5..136ee24e450 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -1866,9 +1866,14 @@  be built.  This can be useful for debugging, or for compatibility with
 previous Ada build procedures, when it was required to explicitly
 do a @samp{make -C gcc gnatlib_and_tools}.
 
-@item --disable-libsanitizer
+@item --enable-libsanitizer
+@itemx --disable-libsanitizer
 Specify that the run-time libraries for the various sanitizers should
-not be built.
+(should not) be built.  The default is @option{--enable-libsanitizer}
+for targets where those libraries are tested and supported,
+@option{--disable-libsanitizer} for other targets.  Explicitly
+requesting @option{--enable-libsanitizer} for unsupported targets may
+cause build failure or runtime issues.
 
 @item --disable-libssp
 Specify that the run-time libraries for stack smashing protection