On Tue, Sep 3, 2024 at 5:44 PM H.J. Lu <hjl.to...@gmail.com> wrote: > > On Fri, Aug 23, 2024 at 5:50 AM Richard Biener > <richard.guent...@gmail.com> wrote: > > > > On Fri, Aug 23, 2024 at 2:36 PM H.J. Lu <hjl.to...@gmail.com> wrote: > > > > > > obj.found is the number of LTO symbols. We should include the offload > > > section when it is used by linker even if there are no LTO symbols. > > > > OK. > > > > > PR lto/116361 > > > * lto-plugin.c (claim_file_handler_v2): Don't check obj.found > > > for the offload section. > > > > > > Signed-off-by: H.J. Lu <hjl.to...@gmail.com> > > > --- > > > lto-plugin/lto-plugin.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c > > > index 61b0de62f52..c564b36eb92 100644 > > > --- a/lto-plugin/lto-plugin.c > > > +++ b/lto-plugin/lto-plugin.c > > > @@ -1320,7 +1320,7 @@ claim_file_handler_v2 (const struct > > > ld_plugin_input_file *file, > > > if (*can_be_claimed && !obj.offload && offload_files_last_lto == NULL) > > > offload_files_last_lto = offload_files_last; > > > > > > - if (obj.offload && known_used && obj.found > 0) > > > + if (obj.offload && known_used) > > > { > > > /* Add file to the list. The order must be exactly the same as > > > the final > > > order after recompilation and linking, otherwise host and target > > > tables > > > -- > > > 2.46.0 > > > > > OK to backport > > https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a98dd536b1017c2b814a3465206c6c01b2890998 > > and this patch to release branches?
OK for the GCC 14 branch - the one the bug was reported against. Please wait with further backporting. Richard. > Thanks. > > -- > H.J.