aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/vxworks.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2020-05-05 12:33:11 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2020-05-05 12:42:22 +0200
commit5269b24605b17211f34dd40df2d18ba7a7f481e2 (patch)
tree8837eee81dbd7ff67d62c12f8dacc61f95c4995f /gcc/config/vxworks.h
parent2badc9885330b56dfabb49328c42de792bc67b1e (diff)
downloadgcc-5269b24605b17211f34dd40df2d18ba7a7f481e2.zip
gcc-5269b24605b17211f34dd40df2d18ba7a7f481e2.tar.gz
gcc-5269b24605b17211f34dd40df2d18ba7a7f481e2.tar.bz2
Silence warning in LTO mode on VxWorks
The link phase is always partial (-r) for VxWorks in kernel mode, which means that it uses incremental LTO linking by default (-flinker-output=rel). But in this mode the LTO plugin outputs a warning if one of the object files involved in the link does not contain LTO bytecode, before switching to nolto-rel mode. We do not do repeated incremental linking for VxWorks so silence the warning. lto-plugin/ * lto-plugin.c: Document -linker-output-auto-notlo-rel option. (linker_output_set): Change type to bool. (linker_output_known): Likewise. (linker_output_auto_nolto_rel): New variable. (all_symbols_read_handler): Take it into account. <LDPO_REL>: Do not issue the warning if it is set. (process_option): Process -linker-output-auto-notlo-rel. (cleanup_handler): Remove unused variable. (onload) <LDPT_LINKER_OUTPUT>: Adjust to above type change. gcc/ * gcc.c (LTO_PLUGIN_SPEC): Define if not already. (LINK_PLUGIN_SPEC): Execute LTO_PLUGIN_SPEC. * config/vxworks.h (LTO_PLUGIN_SPEC): Define.
Diffstat (limited to 'gcc/config/vxworks.h')
-rw-r--r--gcc/config/vxworks.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h
index 58c0e78..d648d2f 100644
--- a/gcc/config/vxworks.h
+++ b/gcc/config/vxworks.h
@@ -273,3 +273,11 @@ extern void vxworks_asm_out_destructor (rtx symbol, int priority);
#undef DWARF_GNAT_ENCODINGS_DEFAULT
#define DWARF_GNAT_ENCODINGS_DEFAULT \
(TARGET_VXWORKS7 ? DWARF_GNAT_ENCODINGS_MINIMAL : DWARF_GNAT_ENCODINGS_ALL)
+
+/* The default configuration of incremental LTO linking (-flinker-output=rel)
+ warns if an object file included in the link does not contain LTO bytecode,
+ because in this case the output will not contain it either, thus preventing
+ further incremental LTO linking. We do not do repeated incremental linking
+ so silence the warning (instead of passing -flinker-output=nolto-rel). */
+#undef LTO_PLUGIN_SPEC
+#define LTO_PLUGIN_SPEC "%{!mrtp:-plugin-opt=-linker-output-auto-notlo-rel}"