aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/vxworks.h8
-rw-r--r--gcc/gcc.c5
3 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7363478..71977b5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2020-05-05 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc.c (LTO_PLUGIN_SPEC): Define if not already.
+ (LINK_PLUGIN_SPEC): Execute LTO_PLUGIN_SPEC.
+ * config/vxworks.h (LTO_PLUGIN_SPEC): Define.
+
+2020-05-05 Eric Botcazou <ebotcazou@adacore.com>
+
* gimplify.c (gimplify_init_constructor): Do not put the constructor
into static memory if it is not complete.
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}"
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 9f790db..b0d0308 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -944,6 +944,10 @@ proper position among the other output files. */
# endif
#endif
+#ifndef LTO_PLUGIN_SPEC
+#define LTO_PLUGIN_SPEC ""
+#endif
+
/* Conditional to test whether the LTO plugin is used or not.
FIXME: For slim LTO we will need to enable plugin unconditionally. This
still cause problems with PLUGIN_LD != LD and when plugin is built but
@@ -968,6 +972,7 @@ proper position among the other output files. */
-plugin %(linker_plugin_file) \
-plugin-opt=%(lto_wrapper) \
-plugin-opt=-fresolution=%u.res \
+ " LTO_PLUGIN_SPEC "\
%{flinker-output=*:-plugin-opt=-linker-output-known} \
%{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}} \
}" PLUGIN_COND_CLOSE