linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Clark <james.clark@arm.com>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Tom Rix <trix@redhat.com>, Kan Liang <kan.liang@linux.intel.com>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Andrii Nakryiko <andrii@kernel.org>,
	Gaosheng Cui <cuigaosheng1@huawei.com>,
	Rob Herring <robh@kernel.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH v1 2/6] perf build: Don't always set -funwind-tables and -ggdb3
Date: Fri, 28 Jul 2023 09:56:43 +0100	[thread overview]
Message-ID: <bd06ac8f-f3be-cd46-7dd7-86db7e7b7c63@arm.com> (raw)
In-Reply-To: <20230728064917.767761-3-irogers@google.com>



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 <irogers@google.com>
> ---
>  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 <james.clark@arm.com>

  reply	other threads:[~2023-07-28  8:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28  6:49 [PATCH v1 0/6] Simplify C/C++ compiler flags Ian Rogers
2023-07-28  6:49 ` [PATCH v1 1/6] perf bpf-loader: Remove unneeded diagnostic pragma Ian Rogers
2023-07-28  8:56   ` James Clark
2023-07-28  6:49 ` [PATCH v1 2/6] perf build: Don't always set -funwind-tables and -ggdb3 Ian Rogers
2023-07-28  8:56   ` James Clark [this message]
2023-07-28  6:49 ` [PATCH v1 3/6] perf build: Add Wextra for C++ compilation Ian Rogers
2023-07-28  8:57   ` James Clark
2023-07-28  6:49 ` [PATCH v1 4/6] perf build: Disable fewer flex warnings Ian Rogers
2023-07-28  8:50   ` James Clark
2023-07-28 13:59     ` Arnaldo Carvalho de Melo
2023-07-28 14:02       ` Arnaldo Carvalho de Melo
2023-07-28 15:26         ` Ian Rogers
2023-07-28 18:10           ` Arnaldo Carvalho de Melo
2023-07-28 18:43             ` Arnaldo Carvalho de Melo
     [not found]               ` <CAP-5=fUOD4hgQBmXjQh0HujO_39zQQhv_Wv5oirgAC4N8Ao1nw@mail.gmail.com>
2023-07-31 21:16                 ` Arnaldo Carvalho de Melo
2023-08-01  2:29                   ` Arnaldo Carvalho de Melo
2023-07-28  6:49 ` [PATCH v1 5/6] perf build: Disable fewer bison warnings Ian Rogers
2023-07-28  6:49 ` [PATCH v1 6/6] perf build: Remove -Wno-redundant-decls in 2 cases Ian Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd06ac8f-f3be-cd46-7dd7-86db7e7b7c63@arm.com \
    --to=james.clark@arm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=cuigaosheng1@huawei.com \
    --cc=eddyz87@gmail.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=robh@kernel.org \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).