From: Dmitry V. Levin Date: Sun, 5 Sep 2021 08:00:00 +0000 (+0000) Subject: src: add -Wno-error=stack-usage= to AM_LDFLAGS X-Git-Tag: elfutils-0.186~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02b05e183998943dd5a19ba783b8793e2ab9ab44;p=thirdparty%2Felfutils.git src: add -Wno-error=stack-usage= to AM_LDFLAGS 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. References: https://sourceware.org/bugzilla/show_bug.cgi?id=24498 Signed-off-by: Dmitry V. Levin --- diff --git a/config/ChangeLog b/config/ChangeLog index 70a1e9239..b2c0af8ac 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2021-09-05 Dmitry V. Levin + + * eu.am (STACK_USAGE_NO_ERROR): New variable. + 2021-07-06 Alice Zhang * debuginfod.sysconfig: Introduce default retry limit. diff --git a/config/eu.am b/config/eu.am index 2c3e4571d..58cd3c4fe 100644 --- a/config/eu.am +++ b/config/eu.am @@ -39,8 +39,10 @@ ARFLAGS = cr # Warn about stack usage of more than 256K = 262144 bytes. if ADD_STACK_USAGE_WARNING STACK_USAGE_WARNING=-Wstack-usage=262144 +STACK_USAGE_NO_ERROR=-Wno-error=stack-usage= else STACK_USAGE_WARNING= +STACK_USAGE_NO_ERROR= endif if SANE_LOGICAL_OP_WARNING diff --git a/src/ChangeLog b/src/ChangeLog index b729eaa47..e83e0a5e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2021-09-05 Dmitry V. Levin + + * Makefile.am (AM_LDFLAGS): Add $(STACK_USAGE_NO_ERROR). + 2021-08-20 Saleem Abdulrasool * elfclassify.c: Remove error.h include. diff --git a/src/Makefile.am b/src/Makefile.am index 88d0ac8ff..86d5bcf84 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,7 +23,7 @@ AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf \ -I$(srcdir)/../libdwfl -I$(srcdir)/../libasm -AM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw +AM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw $(STACK_USAGE_NO_ERROR) bin_PROGRAMS = readelf nm size strip elflint findtextrel addr2line \ elfcmp objdump ranlib strings ar unstrip stack elfcompress \