diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-09-28 13:31:39 +0200 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-09-28 18:29:55 +0200 |
| commit | b1f035ad79a591f792bfa097fae075f78f29dd46 (patch) | |
| tree | c7bfabd86d42163de21086140d7fbce0617b5075 /tools/perf/python | |
| parent | 0ae6fc78c5ce0dfd18d8712a50f0fd4602eff103 (diff) | |
| download | linux-next-b1f035ad79a591f792bfa097fae075f78f29dd46.tar.gz linux-next-b1f035ad79a591f792bfa097fae075f78f29dd46.zip | |
tools feature gettid: Undef _GNU_SOURCE before defining it
Since most of tools/build/feature/test-*.c feature tests are included in
tools/build/feature/test-all.c, we can't just definie _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")
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/python')
0 files changed, 0 insertions, 0 deletions
