From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/1] tools feature gettid: Undef _GNU_SOURCE before defining it
Date: Mon, 28 Sep 2026 18:30:09 +0200 [thread overview]
Message-ID: <arqWEZef5mdrc6vO@x2> (raw)
In-Reply-To: <CAP-5=fUyYuheX6jC=+WOYw4kM3Ak0S1SFk45QgCXhgy23V+F3g@mail.gmail.com>
On Mon, Sep 28, 2026 at 08:12:45AM -0700, Ian Rogers wrote:
> On Mon, Sep 28, 2026 at 5:02 AM Arnaldo Carvalho de Melo
> <acme@kernel.org> wrote:
> >
> > Since most of tools/build/feature/test-*.c feature tests are included in
> > tools/build/feature/test-all.c, we can't just define _GNU_SOURCE as it
> > may already been defined and this will break the build with:
> >
> > acme@alta:~$ cat /tmp/build/perf-tools-next/feature/test-all.make.output
> > In file included from test-all.c:26:
> > test-gettid.c:3:9: error: "_GNU_SOURCE" redefined [-Werror]
> > 3 | #define _GNU_SOURCE
> > | ^~~~~~~~~~~
> > In file included from /usr/include/python3.13/pyconfig.h:9,
> > from /usr/include/python3.13/Python.h:14,
> > from test-python-module.c:2,
> > from test-all.c:14:
> > /usr/include/aarch64-linux-gnu/python3.13/pyconfig.h:1810:10: note: this is the location of the previous definition
> > 1810 | # define _GNU_SOURCE 1
> > | ^~~~~~~~~~~
> > cc1: all warnings being treated as errors
> > acme@alta:~$
> >
> > I.e. pyconfig.h is included by the new test-python-module.c, that is at
> > the start of test-all.c, defines _GNU_SOURCE, noticed on Debian 13
> > (/usr/include/aarch64-linux-gnu/python3.13/pyconfig.h, libpython
> > 3.13.5-2+deb13u5), and then test-all.c includes test-gettid.c that was
> > defining it as well, undef it first as does several other tests.
> >
> > Fixes: 1b7e0280e247b93d ("perf Makefile: Update Python script installation path")
> > Cc: Ian Rogers <irogers@google.com>
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> Reviewed-by: Ian Rogers <irogers@google.com>
Thanks, applied to perf-tools-next, for v7.4.
- Arnaldo
prev parent reply other threads:[~2026-09-28 16:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 12:02 [PATCH 1/1] tools feature gettid: Undef _GNU_SOURCE before defining it Arnaldo Carvalho de Melo
2026-09-28 12:04 ` sashiko-bot
2026-09-28 12:09 ` Arnaldo Carvalho de Melo
2026-09-28 15:12 ` Ian Rogers
2026-09-28 16:30 ` Arnaldo Carvalho de 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=arqWEZef5mdrc6vO@x2 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@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