aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-09-11 11:20:35 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-09-11 11:20:35 +0000
commit5a307ee54bca63865b6e5e8ad690720adf0b9d78 (patch)
tree94e483c2a7f7db580d29f337e1cd73169eb6a10e /gcc/doc
parent46dfa8ad6c18feb45d35734eae38798edb7c38cd (diff)
downloadgcc-5a307ee54bca63865b6e5e8ad690720adf0b9d78.zip
gcc-5a307ee54bca63865b6e5e8ad690720adf0b9d78.tar.gz
gcc-5a307ee54bca63865b6e5e8ad690720adf0b9d78.tar.bz2
lto-opts.c (lto_write_options): Stream -g when debug is enabled.
2019-09-11 Richard Biener <rguenther@suse.de> * lto-opts.c (lto_write_options): Stream -g when debug is enabled. * lto-wrapper.c (merge_and_complain): Pick up -g. (append_compiler_options): Likewise. (run_gcc): Re-instantiate handling -g0 at link-time. * doc/invoke.texi (flto): Document debug info generation. From-SVN: r275640
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 234c1b7..6e91a66 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -10339,6 +10339,14 @@ conflicting translation units. Specifically
precedence; and for example @option{-ffp-contract=off} takes precedence
over @option{-ffp-contract=fast}. You can override them at link time.
+To enable debug info generation you need to supply @option{-g} at
+compile-time. If any of the input files at link time were built
+with debug info generation enabled the link will enable debug info
+generation as well. Any elaborate debug info settings
+like the dwarf level @option{-gdwarf-5} need to be explicitely repeated
+at the linker command line and mixing different settings in different
+translation units is discouraged.
+
If LTO encounters objects with C linkage declared with incompatible
types in separate translation units to be linked together (undefined
behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be