Message ID | ZV4vUuxBILOC3j73@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1455349vqb; Wed, 22 Nov 2023 08:42:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcWCjzn7Ydlw5apuZLy55tXs6kKRNTQqVsupVYmyH3ONJ++FYiKT4mI3wIPbiLhXHD7BZF X-Received: by 2002:a05:6a21:3290:b0:162:ee29:d3c0 with SMTP id yt16-20020a056a21329000b00162ee29d3c0mr3092863pzb.42.1700671377685; Wed, 22 Nov 2023 08:42:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700671377; cv=none; d=google.com; s=arc-20160816; b=m0V9q1Wp917axJaOh6tLP6NXdhJePT/1Ue+IJo1Gt//KoGEc+2vYYwkVIx9XbUpMCm bFVAPO3eNCZYV/+CZz8XgJ9NFeWa9F91EYRJnb4YLOks/TSoGHopIZ7ZGHEtF8s5xvXW WoAahOaDQglHm7bNBdT/rfaTAXmo63jL2VMg3hlZvtURgEItwgXWL4XTNMiWFtSkR4cp +2OQtuDZi9mFRWUAPyJd2aMdBvBid4j5XmDsMnHQQjlfiT5+UyJ2BjZkDPxB8q762T3l U1Gl7yDZVlN1oGmbLJ2wIY/210/r+EqrDPr9zY3hx6/bF4S+xn5tciiZya28rjOBttL4 hZ1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=ftIaxopIhwM92EalYyuD2EN3TgdE0R8fPf/u9q08hqg=; fh=nrc3z6e4JOttymMwnbnnPjmOY21KDQ9FZbEuG6quWeo=; b=ABaEg9rIUaDwNAC2+/eXWK0/KasNPTFWD6dHWRpUCP1x21vsYr/BHjZeAqeN+C+Pwx TQ0EoWLZPhLXIarwqIS42driZ3zH7sLF3U+gxgsnbEeud5yIsFuMSUurmW3Z8O645eEE LSQemkOKs+ExxNg0Pl97IKSbMYn5lS9pvtrzl3bZmZC9eTRQx5FU0/+QIGWSZNfhulcR z5QiFkDDC+udX9fXuPCzNjgb4lpR5OIxhYT3hUAFvc7gzL8eO4yN797FCNtVgx/FJKY2 HO0bbZG41H6pQMSiwm5OLdG1spn+0i8KFCxdLr3XJiIUSEH/B+yBWaU+afWGtpL8Pg6C cDyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DIO7SJYf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id h12-20020a056a00170c00b006cbb2cd545esi5744867pfc.5.2023.11.22.08.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 08:42:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DIO7SJYf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 745DC8054D26; Wed, 22 Nov 2023 08:42:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344121AbjKVQmh (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Wed, 22 Nov 2023 11:42:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233910AbjKVQmU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Nov 2023 11:42:20 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F21D1FE7 for <linux-kernel@vger.kernel.org>; Wed, 22 Nov 2023 08:41:58 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAEAEC433C9; Wed, 22 Nov 2023 16:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700671318; bh=7EKdU32WWa/sEoS6u1uS+G0T8qjltebPy5sZKOAuHMU=; h=Date:From:To:Cc:Subject:From; b=DIO7SJYfX8czGIfPUzI7CtRQbOjHEu0W3xEqzylbNEJqlliAVA+b2ypsBO2aF4s3D 9QFpRCnzTSqp6WXSFYlfOnq1G1O1kpaOmgLN/kbHkJEp/75G1j62tLjFSz3nFgHJRM WE/1Hr2iv5PZN2ueDWHBY2EKoFl5TVwwHVNwR5JwUf8WGwBoSz3neK+tJ1IedsUL1O 5tF64A8FjIkMZo4WDt3dzadVFdaZYOfV0qzOR6KMAIgb2tYfcqqFRshT5Ac2p8/Inm r5B4leRabnQmOdMyh4d59TiwiptzWznKTJBwzYZ9FMsGMMbDS4JIY74NiMr0zH+3Hp hm0RP8z6xuh8w== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 0168840094; Wed, 22 Nov 2023 13:41:54 -0300 (-03) Date: Wed, 22 Nov 2023 13:41:54 -0300 From: Arnaldo Carvalho de Melo <acme@kernel.org> To: Namhyung Kim <namhyung@kernel.org> Cc: Ian Rogers <irogers@google.com>, Adrian Hunter <adrian.hunter@intel.com>, Jiri Olsa <jolsa@kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, linux-perf-users@vger.kernel.org Subject: [PATCH 1/1] tools: Disable __packed attribute compiler warning due to -Werror=attributes Message-ID: <ZV4vUuxBILOC3j73@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 22 Nov 2023 08:42:48 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783283190328690519 X-GMAIL-MSGID: 1783283190328690519 |
Series |
[1/1] tools: Disable __packed attribute compiler warning due to -Werror=attributes
|
|
Commit Message
Arnaldo Carvalho de Melo
Nov. 22, 2023, 4:41 p.m. UTC
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(+)
Comments
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 >
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); \