This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix regressions in libgomp testsuite: set flag_fat_lto_objects for offload
- From: Ilya Verbin <iverbin at gmail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Date: Fri, 14 Nov 2014 19:07:09 +0300
- Subject: [PATCH] Fix regressions in libgomp testsuite: set flag_fat_lto_objects for offload
- Authentication-results: sourceware.org; auth=none
- References: <20141114160441 dot GA40445 at msticlxl57 dot ims dot intel dot com>
<Resending to gcc-patches@gcc.gnu.org>
Hi,
This patch fixes recent regressions in libgomp testsuite:
https://gcc.gnu.org/ml/gcc-regression/2014-11/msg00343.html
They are reproducible only with ld from trunk, ld 2.24 works fine.
When GCC emits sections with offload IR, it should not emit "__gnu_lto_slim"
symbol, otherwise linker plugin tries to compile LTO IR, which is not present.
Bootstrap and regtesting on x86_64-linux using binutils 20141114 in progress.
OK for trunk when finished?
Thanks,
-- Ilya
gcc/
* cgraphunit.c (symbol_table::compile): Set flag_fat_lto_objects
in case of g->have_offload.
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 534c613..584a84e 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -2178,7 +2178,10 @@ symbol_table::compile (void)
/* Offloading requires LTO infrastructure. */
if (!in_lto_p && g->have_offload)
- flag_generate_lto = 1;
+ {
+ flag_generate_lto = 1;
+ flag_fat_lto_objects = 1;
+ }
/* If LTO is enabled, initialize the streamer hooks needed by GIMPLE. */
if (flag_generate_lto)