[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <D6618627-090D-4795-8EEB-72628537D39A@gmail.com>
Date: Thu, 04 Dec 2025 11:32:47 -0300
From: Arnaldo Melo <arnaldo.melo@...il.com>
To: Namhyung Kim <namhyung@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>
CC: Adrian Hunter <adrian.hunter@...el.com>, Ian Rogers <irogers@...gle.com>,
James Clark <james.clark@...aro.org>, Jiri Olsa <jolsa@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-perf-users@...r.kernel.org
Subject: Re: [PATCH v6.19-rc1 1/1] libperf: Compile using -std=gnu17 to deal with visibility attribute issues
On December 4, 2025 5:41:51 AM GMT-03:00, Namhyung Kim <namhyung@...nel.org> wrote:
>On Wed, Dec 03, 2025 at 06:20:08PM -0300, Arnaldo Carvalho de Melo wrote:
>> We seem to need a more invasive patch using 'extern' on all LIBPERF_API
>> prefixed functions to be future proof, so use -std=gnu17 which is the
>> one in gcc 14, present in the distro generation before ubuntu 25.10 (gcc
>> 15).
>
>Something like this?
Yeah, I probably got carried away with libbpf's accidental way of "dealing" with it.
Will test build it, or have you already?
- Arnaldo
>
>Thanks,
>Namhyung
>
>
>diff --git a/tools/lib/perf/include/perf/core.h b/tools/lib/perf/include/perf/core.h
>index a3f6d68edad76240..06cc132d88cf3436 100644
>--- a/tools/lib/perf/include/perf/core.h
>+++ b/tools/lib/perf/include/perf/core.h
>@@ -5,7 +5,7 @@
> #include <stdarg.h>
>
> #ifndef LIBPERF_API
>-#define LIBPERF_API __attribute__((visibility("default")))
>+#define LIBPERF_API extern __attribute__((visibility("default")))
> #endif
>
> enum libperf_print_level {
- Arnaldo
Powered by blists - more mailing lists