mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Melo <arnaldo.melo@gmail.com>
To: Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	Ian Rogers <irogers@google.com>,
	James Clark <james.clark@linaro.org>,
	Jiri Olsa <jolsa@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v6.19-rc1 1/1] libperf: Compile using -std=gnu17 to deal with visibility attribute issues
Date: Thu, 04 Dec 2025 11:32:47 -0300	[thread overview]
Message-ID: <D6618627-090D-4795-8EEB-72628537D39A@gmail.com> (raw)
In-Reply-To: <aTFJT8kQsxnxBaS8@google.com>



On December 4, 2025 5:41:51 AM GMT-03:00, Namhyung Kim <namhyung@kernel.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

      reply	other threads:[~2025-12-04 14:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03 21:20 Arnaldo Carvalho de Melo
2025-12-04  8:41 ` Namhyung Kim
2025-12-04 14:32   ` Arnaldo Melo [this message]

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=D6618627-090D-4795-8EEB-72628537D39A@gmail.com \
    --to=arnaldo.melo@gmail.com \
    --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=namhyung@kernel.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

all inboxes | Powered by JetHome®