From patchwork Tue Aug 22 12:33:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 136545 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp3648810vqi; Tue, 22 Aug 2023 07:07:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFsfkIWjFoxnfKi7FCULq6yuq52a+IMUA1PsXy76BrEnjO746RYM3iJOAsFx/rPvRdCfNWS X-Received: by 2002:aa7:de12:0:b0:523:6c47:56f8 with SMTP id h18-20020aa7de12000000b005236c4756f8mr6609682edv.18.1692713243073; Tue, 22 Aug 2023 07:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692713243; cv=none; d=google.com; s=arc-20160816; b=yK1furSlSSjJOPdCVdRI+IeZNUR3L9TUJJZLGZG7YsMZVKsLwkxC1FOjglBo/foi7h 4s8QqRBXu5ZPjflinOKYNBlSUeydr720GTwCtmjcCm5963p42dJGTIjxl20urQHCQ61A VoBdEP3v0wOfQL2EVCTHqMGrl30sdzyq/phDloxzum9GNlBEbR7MXCPtcwXDSJKJVy/h snGUdhLE6TpbTWC2Lfo37Wmf7RKvyCSnPZ6QqnCs6o7pQ5pRvP9st+ruHDPf/CIgyqnz kG8aYUYTqxsaC3m2bQseyI+jhOueMDddWIZxFQKSmEsL2zpFmisF9KwMu1c6NPM7zUzW eS2g== 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=RBZ6p9JsY7V7EcOQXGTUje0KOc8oAM0b+slno0mnKJQ=; fh=qv8SSKppR7lT65KrMJm3ScFZRvkUqDqfG4Yrr2OAoac=; b=lkkb3ETDwpkuI1JmwRv8HuHEzVt8kZtvaxccXUxXbii4Um8Ml5yg1ynl6Q2qMeDDB2 5wxxVghwYgGuLtNvTRqB65e692UgBIHRLo7ccNC5cpyoF9MruLryf8G/M1o7xWOZKmdZ IKu3dUXSGIp9wCHBzQk9RQE4881d8lZnvFKDSAunD1ZiDnX2NdaHVejm9e/FutVu2iA7 jYkLWA/jomApgbv+bt2wv2hCrvRcC2Smt5N1fAeK+VC5lvNbmOioU4H6/FM6+lH5zLUI Q2i8/+yWn6z9x7WHPcIb8PUUeo0TrldWLuQk7ZpG8gV1NBEBqbfcewubLOo0i56x+vOD 1PYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=urCgWTBa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q23-20020aa7da97000000b0052907bbfbe6si6657610eds.393.2023.08.22.07.06.58; Tue, 22 Aug 2023 07:07:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=urCgWTBa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235483AbjHVMdX (ORCPT + 99 others); Tue, 22 Aug 2023 08:33:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233344AbjHVMdW (ORCPT ); Tue, 22 Aug 2023 08:33:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC2811BD for ; Tue, 22 Aug 2023 05:33:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2E2E7655C3 for ; Tue, 22 Aug 2023 12:33:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3987FC433C7; Tue, 22 Aug 2023 12:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692707599; bh=vnIdzGAF0y6qaOS7FfPLpa7ABxpUY3LbjrqN9lIQpCA=; h=Date:From:To:Cc:Subject:From; b=urCgWTBa6jErPRUjQi1CCUDEitgFysTzl+gky0LLDucR53VWS20E1JGNk+0pID/5R t/AZgw0FsHAWItB2qoToFsHMShdA8jg7l8btplsDygs1Dyd5yuq9PXlT66fpGH3qhH Rj3g8WGtvGsLlp9s4iTPqVZ2oQlDkHQ6GuSMmTY+dCzNpcQ98+NC5vyEoJ/T8SeVsV 0kuzubchgKJD+6LeWjTcRDLqA+wZrflLLTxBBBYiaq69R5kUIMm5jXj9ATFO4W8ZvO jOzvLUqfUOfnr+v6O0JVJIXxgpFbrpiCdQ0U5OmGg78bDtDLhmz6BJrbDmDAZXlq6c pcj/qq61BR9VQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 72B8440722; Tue, 22 Aug 2023 09:33:16 -0300 (-03) Date: Tue, 22 Aug 2023 09:33:16 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Adrian Hunter , Jiri Olsa , amadio@ghostprotocols.net, Namhyung Kim , Guilherme Amadio , Linux Kernel Mailing List Subject: perf tools: Options being passed to clang when building the BPF part of skels Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774938481396034306 X-GMAIL-MSGID: 1774938481396034306 Hi, On gentoo I'm noticing this: clang-16clang-16: : clang-16error: : error: clang-16clang-16: clang-16clang-16clang-16: clang-16error: clang-16: : ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Werror,-Woption-ignored]: : : clang-16error: ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Werror,-Woption-ignored]error: error: : error: error: error: error: ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Werror,-Woption-ignored]ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Werror,-Woption-ignored]error: ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Werror,-Woption-ignored]ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Werror,-Woption-ignored] ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Werror,-Woption-ignored]ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Werror,-Woption-ignored]ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Werror,-Woption-ignored]ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Werror,-Woption-ignored] ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Werror,-Woption-ignored] And while just doing: "Fixes" it, I'm curious as where is that we're setting up the options that are being passed to clang at: tools/perf/Makefile.perf $(SKEL_TMP_OUT)/%.bpf.o: util/bpf_skel/%.bpf.c $(LIBBPF) $(SKEL_OUT)/vmlinux.h | $(SKEL_TMP_OUT) $(QUIET_CLANG)$(CLANG) -g -O2 --target=bpf -Wall -Werror $(BPF_INCLUDE) $(TOOLS_UAPI_INCLUDE) \ -c $(filter util/bpf_skel/%.bpf.c,$^) -o $@ Perhaps it is plain just using CFLAGS? I.e. maybe the native build CFLAGS is being passed to the BPF target clang calls? Ideas? - Arnaldo diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index a5dd1ba..7726b57 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -1101,7 +1101,7 @@ else endif $(SKEL_TMP_OUT)/%.bpf.o: util/bpf_skel/%.bpf.c $(LIBBPF) $(SKEL_OUT)/vmlinux.h | $(SKEL_TMP_OUT) - $(QUIET_CLANG)$(CLANG) -g -O2 --target=bpf -Wall -Werror $(BPF_INCLUDE) $(TOOLS_UAPI_INCLUDE) \ + $(QUIET_CLANG)$(CLANG) -g -O2 --target=bpf -Wall -Werror -Wno-option-ignored $(BPF_INCLUDE) $(TOOLS_UAPI_INCLUDE) \ -c $(filter util/bpf_skel/%.bpf.c,$^) -o $@ $(SKEL_OUT)/%.skel.h: $(SKEL_TMP_OUT)/%.bpf.o | $(BPFTOOL)