Linux Perf Users
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ian Rogers <irogers@google.com>, Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Clark <james.clark@linaro.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org
Subject: [PATCH] perf build: Fix a compiler error in util/libbfd.c
Date: Wed, 15 Jul 2026 17:43:36 -0700	[thread overview]
Message-ID: <20260716004336.2731086-1-namhyung@kernel.org> (raw)

The bfd_boolean type was gone and converted to the standard bool type
but we have some old code that uses the type.  It caused a failure in
the build test.

  util/libbfd.c: In function 'slurp_symtab':
  util/libbfd.c:94:9: error: unknown type name 'bfd_boolean'
     94 |         bfd_boolean dynamic = FALSE;
        |         ^~~~~~~~~~~
  util/libbfd.c:94:31: error: 'FALSE' undeclared (first use in this function)
     94 |         bfd_boolean dynamic = FALSE;
        |                               ^~~~~
  util/libbfd.c:94:31: note: each undeclared identifier is reported only once for each function it appears in
  util/libbfd.c:102:27: error: 'TRUE' undeclared (first use in this function)
    102 |                 dynamic = TRUE;
        |                           ^~~~

Fix it with standard bool type and constants.

Link: https://sourceware.org/pipermail/binutils-cvs/2021-March/056231.html
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/util/libbfd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/libbfd.c b/tools/perf/util/libbfd.c
index c1c12308cc12ffea..d8241c7caac50836 100644
--- a/tools/perf/util/libbfd.c
+++ b/tools/perf/util/libbfd.c
@@ -91,7 +91,7 @@ static int slurp_symtab(bfd *abfd, struct a2l_data *a2l)
 	long storage;
 	long symcount;
 	asymbol **syms;
-	bfd_boolean dynamic = FALSE;
+	bool dynamic = false;
 
 	if ((bfd_get_file_flags(abfd) & HAS_SYMS) == 0)
 		return bfd_error(bfd_get_filename(abfd));
@@ -99,7 +99,7 @@ static int slurp_symtab(bfd *abfd, struct a2l_data *a2l)
 	storage = bfd_get_symtab_upper_bound(abfd);
 	if (storage == 0L) {
 		storage = bfd_get_dynamic_symtab_upper_bound(abfd);
-		dynamic = TRUE;
+		dynamic = true;
 	}
 	if (storage < 0L)
 		return bfd_error(bfd_get_filename(abfd));
-- 
2.55.0.141.g00534a21ce-goog


             reply	other threads:[~2026-07-16  0:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16  0:43 Namhyung Kim [this message]
2026-07-16  2:44 ` [PATCH] perf build: Fix a compiler error in util/libbfd.c 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=20260716004336.2731086-1-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    /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