[PATCH] src: add -Wno-error=stack-usage= to AM_LDFLAGS

Mark Wielaard mark@klomp.org
Wed Sep 8 21:59:26 GMT 2021

Hi Dmitry,

On Mon, Sep 06, 2021 at 03:59:05AM +0300, Dmitry V. Levin wrote:
> While -Wstack-usage= is already excluded from AM_CFLAGS for various
> tools in src using *_no_Wstack_usage variables, this obviously does not
> help when LTO is enabled, so add -Wno-error=stack-usage= to AM_LDFLAGS
> for linking tools in src.

I didn't know it worked to pass warning flags to the compiler during
linking for lto. That is really useful in this case. Of course maybe
we really should get rid of the unbounded stack allocations in the
first place. But till we do, we need this to build with lto enabled.

Please apply.



More information about the Elfutils-devel mailing list