On Sat, 2020-08-01 at 21:00 +0100, Richard W.M. Jones wrote:
> On Sat, Aug 01, 2020 at 01:28:09PM -0600, Jeff Law wrote:
> > On Sat, 2020-08-01 at 12:34 +0100, Richard W.M. Jones wrote:
> > > On Fri, Jul 31, 2020 at 05:32:34PM -0600, Jeff Law wrote:
> > > > On Fri, 2020-07-31 at 19:26 +0100, Richard W.M. Jones wrote:
> > > > > On Fri, Jul 31, 2020 at 12:02:22PM -0600, Jeff Law wrote:
> > > > > > Looks like it's in the buildroots now.  Let me know if that doesn't 
> > > > > > fix the
> > > > > > problem.
> > > > > 
> > > > > Looks as if "ar" is segfaulting again ...
> > > > > 
> > > > > https://koji.fedoraproject.org/koji/taskinfo?taskID=48288440
> > > > > https://kojipkgs.fedoraproject.org//work/tasks/8440/48288440/build.log
> > > > > 
> > > > > That was built with binutils 2.35-8.fc33
> > > > Just an FYI binutils-2.35-9 is in the buildroots.  It's got the fix for 
> > > > the LTO
> > > > issue, but does not turn on LTO for binutils itself (that'll be in the 
> > > > -10
> > > > build).
> > > > 
> > > > I've confirmed that the -9 build will correctly build binutils-2.35-10. 
> > > >  I've
> > > > also confirmed that the -9 build will correctly build libguestfs.
> > > > 
> > > > I'm going to take my local -10 build and use that to build libguestfs 
> > > > as an
> > > > additional sanity check.
> > > 
> > > Can confirm that libguestfs has been built correctly and is working (with 
> > > LTO).
> > > 
> > > FYI I filed this bug about LTO and inheriting warnings in functions
> > > inlined across files:
> > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96407
> > Yes, that's by design.  Conceptually the compiler doesn't really know that 
> > the
> > pragma refers to any particular function since they don't appear in any 
> > function
> > scope.   ASMs outside function scope have similar issues.
> > 
> > You could try moving the pragmas into function scope.
> 
> I'm not sure exactly what you mean, but this doesn't work (same
> error as before):
> 
> --- test.c ---
> 
> #include <string.h>
> 
> int
> test (int i)
> {
> #pragma GCC diagnostic push
> #pragma GCC diagnostic ignored "-Wstack-usage="
> 
>   char str[i];
>   memset (str, 0, sizeof str);
>   return str[0]+i;
> 
> #pragma GCC diagnostic pop
> }
Yea, that's precisely what I meant and precisely what I feared wouldn't work 
(I'd
tried it with one of mjw's packages trying to address the same issue).  Nor will
it work if you move the pragmas so that they enclose the call site where test
gets inlined.

Given this works with other warnings, I wonder if there's some unexpected
implementation detail with -Wstack-usage= on the GCC side.  I'll look at it next
week.

jeff


_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to