From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 730D4C001E0 for ; Fri, 28 Jul 2023 08:57:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235181AbjG1I5D (ORCPT ); Fri, 28 Jul 2023 04:57:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234095AbjG1I4t (ORCPT ); Fri, 28 Jul 2023 04:56:49 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7E36E3A9B; Fri, 28 Jul 2023 01:56:48 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 43993D75; Fri, 28 Jul 2023 01:57:31 -0700 (PDT) Received: from [10.57.0.116] (unknown [10.57.0.116]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 271683F67D; Fri, 28 Jul 2023 01:56:45 -0700 (PDT) Message-ID: Date: Fri, 28 Jul 2023 09:56:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v1 2/6] perf build: Don't always set -funwind-tables and -ggdb3 Content-Language: en-US To: Ian Rogers References: <20230728064917.767761-1-irogers@google.com> <20230728064917.767761-3-irogers@google.com> Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Tom Rix , Kan Liang , Eduard Zingerman , Andrii Nakryiko , Gaosheng Cui , Rob Herring , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, llvm@lists.linux.dev From: James Clark In-Reply-To: <20230728064917.767761-3-irogers@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On 28/07/2023 07:49, Ian Rogers wrote: > Commit 6a40cd90f5de ("perf tools: Add libunwind dependency for DWARF > CFI unwinding") added libunwind support but also -funwind-tables and > -ggdb3 to the standard build. These build flags aren't necessary so > remove, set -g when DEBUG is enabled for the build. > > Signed-off-by: Ian Rogers > --- > tools/perf/Makefile.config | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > index a9cfe83638a9..14709a6bd622 100644 > --- a/tools/perf/Makefile.config > +++ b/tools/perf/Makefile.config > @@ -246,6 +246,9 @@ ifeq ($(CC_NO_CLANG), 0) > else > CORE_CFLAGS += -O6 > endif > +else > + CORE_CFLAGS += -g > + CXXFLAGS += -g > endif > > ifdef PARSER_DEBUG > @@ -324,8 +327,6 @@ FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes -ldl > FEATURE_CHECK_LDFLAGS-disassembler-init-styled = -lbfd -lopcodes -ldl > > CORE_CFLAGS += -fno-omit-frame-pointer > -CORE_CFLAGS += -ggdb3 > -CORE_CFLAGS += -funwind-tables > CORE_CFLAGS += -Wall > CORE_CFLAGS += -Wextra > CORE_CFLAGS += -std=gnu11 > @@ -333,8 +334,6 @@ CORE_CFLAGS += -std=gnu11 > CXXFLAGS += -std=gnu++14 -fno-exceptions -fno-rtti > CXXFLAGS += -Wall > CXXFLAGS += -fno-omit-frame-pointer > -CXXFLAGS += -ggdb3 > -CXXFLAGS += -funwind-tables > CXXFLAGS += -Wno-strict-aliasing > > HOSTCFLAGS += -Wall Acked-by: James Clark