public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/c++-modules] lto: fix documentation about -fpie and -fpic options
@ 2020-08-28 16:05 Nathan Sidwell
  0 siblings, 0 replies; only message in thread
From: Nathan Sidwell @ 2020-08-28 16:05 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f523aaa039cc0ab59791045a840e4e35f1b1eb24

commit f523aaa039cc0ab59791045a840e4e35f1b1eb24
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Aug 26 10:10:39 2020 +0200

    lto: fix documentation about -fpie and -fpic options
    
    gcc/ChangeLog:
    
            * doc/invoke.texi: Document how are pie and pic options merged.

Diff:
---
 gcc/doc/invoke.texi | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 4cf6b204b56..95d3699d1fa 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -11569,9 +11569,20 @@ There are some code generation flags preserved by GCC when
 generating bytecodes, as they need to be used during the final link.
 Currently, the following options and their settings are taken from
 the first object file that explicitly specifies them: 
-@option{-fPIC}, @option{-fpic}, @option{-fpie}, @option{-fcommon},
-@option{-fexceptions}, @option{-fnon-call-exceptions}, @option{-fgnu-tm}
-and all the @option{-m} target flags.
+@option{-fcommon}, @option{-fexceptions}, @option{-fnon-call-exceptions},
+@option{-fgnu-tm} and all the @option{-m} target flags.
+
+The following options @option{-fPIC}, @option{-fpic}, @option{-fpie} and
+@option{-fPIE} are combined based on the following scheme:
+
+@smallexample
+@option{-fPIC} + @option{-fpic} = @option{-fpic}
+@option{-fPIC} + @option{-fno-pic} = @option{-fno-pic}
+@option{-fpic/-fPIC} + (no option) = (no option)
+@option{-fPIC} + @option{-fPIE} = @option{-fPIE}
+@option{-fpic} + @option{-fPIE} = @option{-fpie}
+@option{-fPIC/-fpic} + @option{-fpie} = @option{-fpie}
+@end smallexample
 
 Certain ABI-changing flags are required to match in all compilation units,
 and trying to override this at link time with a conflicting value


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-28 16:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 16:05 [gcc/devel/c++-modules] lto: fix documentation about -fpie and -fpic options Nathan Sidwell

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