From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vmicros1.altlinux.org (vmicros1.altlinux.org [194.107.17.57]) by sourceware.org (Postfix) with ESMTP id 35A443858408 for ; Mon, 6 Sep 2021 00:59:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 35A443858408 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=altlinux.org Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 2D8BC72C8B0 for ; Mon, 6 Sep 2021 03:59:05 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 1FE497CF771; Mon, 6 Sep 2021 03:59:05 +0300 (MSK) Date: Mon, 6 Sep 2021 03:59:05 +0300 From: "Dmitry V. Levin" To: elfutils-devel@sourceware.org Subject: [PATCH] src: add -Wno-error=stack-usage= to AM_LDFLAGS Message-ID: <20210906005904.GA6598@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2021 00:59:08 -0000 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 --- config/ChangeLog | 4 ++++ config/eu.am | 2 ++ src/ChangeLog | 4 ++++ src/Makefile.am | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/config/ChangeLog b/config/ChangeLog index 70a1e923..b2c0af8a 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 2c3e4571..58cd3c4f 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 b729eaa4..e83e0a5e 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 88d0ac8f..86d5bcf8 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 \ -- ldv