]> gcc.gnu.org Git - gcc.git/commitdiff
lto: fix documentation about -fpie and -fpic options
authorMartin Liska <mliska@suse.cz>
Wed, 26 Aug 2020 08:10:39 +0000 (10:10 +0200)
committerMartin Liska <mliska@suse.cz>
Wed, 26 Aug 2020 11:18:51 +0000 (13:18 +0200)
gcc/ChangeLog:

* doc/invoke.texi: Document how are pie and pic options merged.

gcc/doc/invoke.texi

index 4cf6b204b568df79db20fb38d1f3cba7d25a0c7d..95d3699d1faa528a08dccdea2a31db75d0c28142 100644 (file)
@@ -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
This page took 0.132769 seconds and 5 git commands to generate.