From: Yonghong Song <yhs@meta.com>
To: Fangrui Song <maskray@google.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
Quentin Monnet <quentin@isovalent.com>,
bpf@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH] bpf: Replace deprecated -target with --target= for Clang
Date: Fri, 23 Jun 2023 08:06:05 -0700 [thread overview]
Message-ID: <d4a15fa1-60cc-bb8a-f84d-9d0a1380ab88@meta.com> (raw)
In-Reply-To: <20230623020908.1410959-1-maskray@google.com>
On 6/22/23 7:09 PM, Fangrui Song wrote:
> -target has been deprecated since Clang 3.4 in 2013. Use the preferred
> --target=bpf form instead. This matches how we use --target= in
> scripts/Makefile.clang.
>
> Signed-off-by: Fangrui Song <maskray@google.com>
LGTM with a few nits below. As Daniel mentioned earlier. It would be
to separate tools/perf changes to a separate patch to perf subsystem.
Please also cc
bpf@vger.kernel.org
Acked-by: Yonghong Song <yhs@fb.com>
> ---
> Documentation/bpf/bpf_devel_QA.rst | 10 +++++-----
> Documentation/bpf/btf.rst | 4 ++--
> Documentation/bpf/llvm_reloc.rst | 6 +++---
> drivers/hid/bpf/entrypoints/Makefile | 2 +-
> kernel/bpf/preload/iterators/Makefile | 2 +-
> samples/bpf/Makefile | 6 +++---
> samples/bpf/gnu/stubs.h | 3 ++-
> samples/bpf/test_lwt_bpf.sh | 2 +-
> samples/hid/Makefile | 6 +++---
> tools/bpf/bpftool/Documentation/bpftool-gen.rst | 4 ++--
> tools/bpf/bpftool/Makefile | 2 +-
> tools/bpf/runqslower/Makefile | 2 +-
> tools/build/feature/Makefile | 2 +-
> tools/perf/Documentation/perf-config.txt | 2 +-
> tools/perf/Makefile.perf | 4 ++--
> tools/perf/util/llvm-utils.c | 4 ++--
> tools/testing/selftests/bpf/Makefile | 6 +++---
> tools/testing/selftests/bpf/gnu/stubs.h | 3 ++-
> tools/testing/selftests/hid/Makefile | 6 +++---
> tools/testing/selftests/net/Makefile | 4 ++--
> tools/testing/selftests/tc-testing/Makefile | 2 +-
> 21 files changed, 42 insertions(+), 40 deletions(-)
>
[...]
> diff --git a/samples/bpf/gnu/stubs.h b/samples/bpf/gnu/stubs.h
> index 719225b16626..cc37155fbfa5 100644
> --- a/samples/bpf/gnu/stubs.h
> +++ b/samples/bpf/gnu/stubs.h
> @@ -1 +1,2 @@
> -/* dummy .h to trick /usr/include/features.h to work with 'clang -target bpf' */
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/* dummy .h to trick /usr/include/features.h to work with 'clang --target=bpf' */
Quentin and Daniel already mentioned this one. The SPDX license
change can be removed. This is irrelavent to the theme of this patch.
[...]
> diff --git a/tools/testing/selftests/bpf/gnu/stubs.h b/tools/testing/selftests/bpf/gnu/stubs.h
> index 719225b16626..cc37155fbfa5 100644
> --- a/tools/testing/selftests/bpf/gnu/stubs.h
> +++ b/tools/testing/selftests/bpf/gnu/stubs.h
> @@ -1 +1,2 @@
> -/* dummy .h to trick /usr/include/features.h to work with 'clang -target bpf' */
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/* dummy .h to trick /usr/include/features.h to work with 'clang --target=bpf' */
Here is another place that the SPDX license is not needed.
> diff --git a/tools/testing/selftests/hid/Makefile b/tools/testing/selftests/hid/Makefile
> index 01c0491d64da..2e986cbf1a46 100644
> --- a/tools/testing/selftests/hid/Makefile
> +++ b/tools/testing/selftests/hid/Makefile
> @@ -167,7 +167,7 @@ $(RESOLVE_BTFIDS): $(HOST_BPFOBJ) | $(HOST_BUILD_DIR)/resolve_btfids \
> OUTPUT=$(HOST_BUILD_DIR)/resolve_btfids/ BPFOBJ=$(HOST_BPFOBJ)
>
> # Get Clang's default includes on this system, as opposed to those seen by
> -# '-target bpf'. This fixes "missing" files on some architectures/distros,
> +# '--target=bpf'. This fixes "missing" files on some architectures/distros,
[...]
prev parent reply other threads:[~2023-06-23 15:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 2:09 Fangrui Song
2023-06-23 8:51 ` Quentin Monnet
2023-06-23 11:30 ` Daniel Borkmann
2023-06-23 15:06 ` Yonghong Song [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=d4a15fa1-60cc-bb8a-f84d-9d0a1380ab88@meta.com \
--to=yhs@meta.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=maskray@google.com \
--cc=quentin@isovalent.com \
/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
all inboxes | Powered by JetHome®