* [PATCH 1/1] tools: Disable __packed attribute compiler warning due to -Werror=attributes
@ 2023-11-09 19:53 Arnaldo Carvalho de Melo
2023-11-10 6:23 ` Adrian Hunter
0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-11-09 19:53 UTC (permalink / raw)
To: Adrian Hunter
Cc: Ian Rogers, Jiri Olsa, Namhyung Kim, linux-kernel,
linux-perf-users
Noticed on several perf tools cross build test containers:
[perfbuilder@five ~]$ grep FAIL ~/dm.log/summary
19 10.18 debian:experimental-x-mips : FAIL gcc version 12.3.0 (Debian 12.3.0-6)
20 11.21 debian:experimental-x-mips64 : FAIL gcc version 12.3.0 (Debian 12.3.0-6)
21 11.30 debian:experimental-x-mipsel : FAIL gcc version 12.3.0 (Debian 12.3.0-6)
37 12.07 ubuntu:18.04-x-arm : FAIL gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
42 11.91 ubuntu:18.04-x-riscv64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
44 13.17 ubuntu:18.04-x-sh4 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
45 12.09 ubuntu:18.04-x-sparc64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
[perfbuilder@five ~]$
In file included from util/intel-pt-decoder/intel-pt-pkt-decoder.c:10:
/tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h: In function 'get_unaligned_le16':
/tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h:13:29: error: packed attribute causes inefficient alignment for 'x' [-Werror=attributes]
13 | const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \
| ^
/tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h:27:28: note: in expansion of macro '__get_unaligned_t'
27 | return le16_to_cpu(__get_unaligned_t(__le16, p));
| ^~~~~~~~~~~~~~~~~
This comes from the kernel, where the -Wattributes and -Wpacked isn't
used, -Wpacked is already disabled, do it for the attributes as well.
Fixes: a91c987254651443 ("perf tools: Add get_unaligned_leNN()")
Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/lkml/7c5b626c-1de9-4c12-a781-e44985b4a797@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/include/asm-generic/unaligned.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/include/asm-generic/unaligned.h b/tools/include/asm-generic/unaligned.h
index 156743d399aed223..2fd551915c2025ee 100644
--- a/tools/include/asm-generic/unaligned.h
+++ b/tools/include/asm-generic/unaligned.h
@@ -8,6 +8,7 @@
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpacked"
+#pragma GCC diagnostic ignored "-Wattributes"
#define __get_unaligned_t(type, ptr) ({ \
const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] tools: Disable __packed attribute compiler warning due to -Werror=attributes
2023-11-09 19:53 [PATCH 1/1] tools: Disable __packed attribute compiler warning due to -Werror=attributes Arnaldo Carvalho de Melo
@ 2023-11-10 6:23 ` Adrian Hunter
0 siblings, 0 replies; 4+ messages in thread
From: Adrian Hunter @ 2023-11-10 6:23 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Ian Rogers, Jiri Olsa, Namhyung Kim, linux-kernel,
linux-perf-users
On 9/11/23 21:53, Arnaldo Carvalho de Melo wrote:
> Noticed on several perf tools cross build test containers:
>
> [perfbuilder@five ~]$ grep FAIL ~/dm.log/summary
> 19 10.18 debian:experimental-x-mips : FAIL gcc version 12.3.0 (Debian 12.3.0-6)
> 20 11.21 debian:experimental-x-mips64 : FAIL gcc version 12.3.0 (Debian 12.3.0-6)
> 21 11.30 debian:experimental-x-mipsel : FAIL gcc version 12.3.0 (Debian 12.3.0-6)
> 37 12.07 ubuntu:18.04-x-arm : FAIL gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
> 42 11.91 ubuntu:18.04-x-riscv64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
> 44 13.17 ubuntu:18.04-x-sh4 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
> 45 12.09 ubuntu:18.04-x-sparc64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
> [perfbuilder@five ~]$
>
> In file included from util/intel-pt-decoder/intel-pt-pkt-decoder.c:10:
> /tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h: In function 'get_unaligned_le16':
> /tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h:13:29: error: packed attribute causes inefficient alignment for 'x' [-Werror=attributes]
> 13 | const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \
> | ^
> /tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h:27:28: note: in expansion of macro '__get_unaligned_t'
> 27 | return le16_to_cpu(__get_unaligned_t(__le16, p));
> | ^~~~~~~~~~~~~~~~~
>
> This comes from the kernel, where the -Wattributes and -Wpacked isn't
> used, -Wpacked is already disabled, do it for the attributes as well.
>
> Fixes: a91c987254651443 ("perf tools: Add get_unaligned_leNN()")
> Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Ian Rogers <irogers@google.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Link: https://lore.kernel.org/lkml/7c5b626c-1de9-4c12-a781-e44985b4a797@intel.com
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> tools/include/asm-generic/unaligned.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/include/asm-generic/unaligned.h b/tools/include/asm-generic/unaligned.h
> index 156743d399aed223..2fd551915c2025ee 100644
> --- a/tools/include/asm-generic/unaligned.h
> +++ b/tools/include/asm-generic/unaligned.h
> @@ -8,6 +8,7 @@
> */
> #pragma GCC diagnostic push
> #pragma GCC diagnostic ignored "-Wpacked"
> +#pragma GCC diagnostic ignored "-Wattributes"
>
> #define __get_unaligned_t(type, ptr) ({ \
> const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] tools: Disable __packed attribute compiler warning due to -Werror=attributes
@ 2023-11-22 16:41 Arnaldo Carvalho de Melo
2023-11-22 17:35 ` Namhyung Kim
0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-11-22 16:41 UTC (permalink / raw)
To: Namhyung Kim
Cc: Ian Rogers, Adrian Hunter, Jiri Olsa, Linux Kernel Mailing List,
linux-perf-users
Namhyung, I had to cherry pick this from perf-tools-next as I noticed it
was also failing when trying to build perf-tools/tmp.perf-tools + your
header sync series + Ian's ARM files missing in MANIFEST for the
detached tarball build.
With these patches I managed to complete 'make -C tools/perf build-test'
+ 'perf test' + my suite of perf build containers.
- Arnaldo
----
Noticed on several perf tools cross build test containers:
[perfbuilder@five ~]$ grep FAIL ~/dm.log/summary
19 10.18 debian:experimental-x-mips : FAIL gcc version 12.3.0 (Debian 12.3.0-6)
20 11.21 debian:experimental-x-mips64 : FAIL gcc version 12.3.0 (Debian 12.3.0-6)
21 11.30 debian:experimental-x-mipsel : FAIL gcc version 12.3.0 (Debian 12.3.0-6)
37 12.07 ubuntu:18.04-x-arm : FAIL gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
42 11.91 ubuntu:18.04-x-riscv64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
44 13.17 ubuntu:18.04-x-sh4 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
45 12.09 ubuntu:18.04-x-sparc64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
[perfbuilder@five ~]$
In file included from util/intel-pt-decoder/intel-pt-pkt-decoder.c:10:
/tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h: In function 'get_unaligned_le16':
/tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h:13:29: error: packed attribute causes inefficient alignment for 'x' [-Werror=attributes]
13 | const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \
| ^
/tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h:27:28: note: in expansion of macro '__get_unaligned_t'
27 | return le16_to_cpu(__get_unaligned_t(__le16, p));
| ^~~~~~~~~~~~~~~~~
This comes from the kernel, where the -Wattributes and -Wpacked isn't
used, -Wpacked is already disabled, do it for the attributes as well.
Fixes: a91c987254651443 ("perf tools: Add get_unaligned_leNN()")
Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/lkml/7c5b626c-1de9-4c12-a781-e44985b4a797@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/include/asm-generic/unaligned.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/include/asm-generic/unaligned.h b/tools/include/asm-generic/unaligned.h
index 156743d399aed223..2fd551915c2025ee 100644
--- a/tools/include/asm-generic/unaligned.h
+++ b/tools/include/asm-generic/unaligned.h
@@ -8,6 +8,7 @@
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpacked"
+#pragma GCC diagnostic ignored "-Wattributes"
#define __get_unaligned_t(type, ptr) ({ \
const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] tools: Disable __packed attribute compiler warning due to -Werror=attributes
2023-11-22 16:41 Arnaldo Carvalho de Melo
@ 2023-11-22 17:35 ` Namhyung Kim
0 siblings, 0 replies; 4+ messages in thread
From: Namhyung Kim @ 2023-11-22 17:35 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Ian Rogers, Adrian Hunter, Jiri Olsa, Linux Kernel Mailing List,
linux-perf-users
On Wed, Nov 22, 2023 at 8:41 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> Namhyung, I had to cherry pick this from perf-tools-next as I noticed it
> was also failing when trying to build perf-tools/tmp.perf-tools + your
> header sync series + Ian's ARM files missing in MANIFEST for the
> detached tarball build.
>
> With these patches I managed to complete 'make -C tools/perf build-test'
> + 'perf test' + my suite of perf build containers.
Hmm.. ok. I will cherry-pick it to perf-tools.
Thanks,
Namhyung
> ----
>
> Noticed on several perf tools cross build test containers:
>
> [perfbuilder@five ~]$ grep FAIL ~/dm.log/summary
> 19 10.18 debian:experimental-x-mips : FAIL gcc version 12.3.0 (Debian 12.3.0-6)
> 20 11.21 debian:experimental-x-mips64 : FAIL gcc version 12.3.0 (Debian 12.3.0-6)
> 21 11.30 debian:experimental-x-mipsel : FAIL gcc version 12.3.0 (Debian 12.3.0-6)
> 37 12.07 ubuntu:18.04-x-arm : FAIL gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
> 42 11.91 ubuntu:18.04-x-riscv64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
> 44 13.17 ubuntu:18.04-x-sh4 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
> 45 12.09 ubuntu:18.04-x-sparc64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
> [perfbuilder@five ~]$
>
> In file included from util/intel-pt-decoder/intel-pt-pkt-decoder.c:10:
> /tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h: In function 'get_unaligned_le16':
> /tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h:13:29: error: packed attribute causes inefficient alignment for 'x' [-Werror=attributes]
> 13 | const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \
> | ^
> /tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h:27:28: note: in expansion of macro '__get_unaligned_t'
> 27 | return le16_to_cpu(__get_unaligned_t(__le16, p));
> | ^~~~~~~~~~~~~~~~~
>
> This comes from the kernel, where the -Wattributes and -Wpacked isn't
> used, -Wpacked is already disabled, do it for the attributes as well.
>
> Fixes: a91c987254651443 ("perf tools: Add get_unaligned_leNN()")
> Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Ian Rogers <irogers@google.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Link: https://lore.kernel.org/lkml/7c5b626c-1de9-4c12-a781-e44985b4a797@intel.com
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
> tools/include/asm-generic/unaligned.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/include/asm-generic/unaligned.h b/tools/include/asm-generic/unaligned.h
> index 156743d399aed223..2fd551915c2025ee 100644
> --- a/tools/include/asm-generic/unaligned.h
> +++ b/tools/include/asm-generic/unaligned.h
> @@ -8,6 +8,7 @@
> */
> #pragma GCC diagnostic push
> #pragma GCC diagnostic ignored "-Wpacked"
> +#pragma GCC diagnostic ignored "-Wattributes"
>
> #define __get_unaligned_t(type, ptr) ({ \
> const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \
> --
> 2.41.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-22 17:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-09 19:53 [PATCH 1/1] tools: Disable __packed attribute compiler warning due to -Werror=attributes Arnaldo Carvalho de Melo
2023-11-10 6:23 ` Adrian Hunter
-- strict thread matches above, loose matches on Subject: below --
2023-11-22 16:41 Arnaldo Carvalho de Melo
2023-11-22 17:35 ` Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).