This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix regressions in libgomp testsuite: set flag_fat_lto_objects for offload


<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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]