[PATCH 1/1] bfd: Stop using -Wstack-usage=262144 when built with Clang

Alan Modra amodra@gmail.com
Wed Sep 14 05:17:39 GMT 2022


On Wed, Sep 14, 2022 at 12:29:20AM +0900, Tsukasa OI via Binutils wrote:
> On 2022/09/13 22:44, Jan Beulich wrote:
> > On 13.09.2022 14:59, Tsukasa OI wrote:
> >> Some components of GNU Binutils will pass "-Wstack-usage=262144" when
> >> "GCC >= 5.0" is detected.  However, Clang does not support "-Wstack-usage",
> >> despite that related configuration part in bfd/warning.m4 handles the latest
> >> Clang (15.0.0 as of this writing) as "GCC >= 5.0".
> >>
> >> The option "-Wstack-usage" was ignored when the first version of Clang is
> >> released but even this "ignoring" behavior is removed before Clang 4.0.0.
> >> So, if we give Clang "-Wstack-usage=262144", it generates a warning, making
> >> the build failure.
> > 
> > While not exactly the same, how about passing -Wframe-larger-than= when
> > it's (new enough) Clang, instead of not passing any such option?
> 
> That's a good idea.  But if I do that, that would make another patchset
> on top of this (not PATCH v2 of this).

That's fair enough.  The patch is OK, thanks.

> We need to know a good value of -Wframe-larger-than= for Clang and
> meanwhile, just removing the -Wstack-usage looks acceptable for me.  For
> now, that would be nice to have an approval to apply this patch as is.
> 
> > 
> > Jan
> > 

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list