* [PATCH] perf build: Add clang and rust target flags for loongarch
@ 2026-04-14 8:05 WANG Rui
2026-04-14 8:15 ` Huacai Chen
2026-04-14 10:03 ` Miguel Ojeda
0 siblings, 2 replies; 4+ messages in thread
From: WANG Rui @ 2026-04-14 8:05 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Miguel Ojeda, Nathan Chancellor
Cc: Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
Adrian Hunter, James Clark, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Trevor Gross, Danilo Krummrich, Nick Desaulniers, Bill Wendling,
Justin Stitt, linux-perf-users, linux-kernel, rust-for-linux,
llvm, loongarch, Haiyong Sun, WANG Rui
From: Haiyong Sun <sunhaiyong@loongson.cn>
Add missing CLANG_TARGET_FLAGS_loongarch and RUST_TARGET_FLAGS_loongarch
so that perf can be built with clang and enable rust cross compilation.
Signed-off-by: Haiyong Sun <sunhaiyong@loongson.cn>
Signed-off-by: WANG Rui <r@hev.cc>
---
tools/perf/Makefile.config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 15fbba9f4..1340744a6 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -27,6 +27,7 @@ CFLAGS += -fno-strict-aliasing
ifeq ($(CC_NO_CLANG), 0)
CLANG_TARGET_FLAGS_arm := arm-linux-gnueabi
CLANG_TARGET_FLAGS_arm64 := aarch64-linux-gnu
+ CLANG_TARGET_FLAGS_loongarch := loongarch64-linux-gnu
CLANG_TARGET_FLAGS_m68k := m68k-linux-gnu
CLANG_TARGET_FLAGS_mips := mipsel-linux-gnu
CLANG_TARGET_FLAGS_powerpc := powerpc64le-linux-gnu
@@ -1167,6 +1168,7 @@ ifndef NO_RUST
ifneq ($(CROSS_COMPILE),)
RUST_TARGET_FLAGS_arm := arm-unknown-linux-gnueabi
RUST_TARGET_FLAGS_arm64 := aarch64-unknown-linux-gnu
+ RUST_TARGET_FLAGS_loongarch := loongarch64-unknown-linux-gnu
RUST_TARGET_FLAGS_m68k := m68k-unknown-linux-gnu
RUST_TARGET_FLAGS_mips := mipsel-unknown-linux-gnu
RUST_TARGET_FLAGS_powerpc := powerpc64le-unknown-linux-gnu
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] perf build: Add clang and rust target flags for loongarch
2026-04-14 8:05 [PATCH] perf build: Add clang and rust target flags for loongarch WANG Rui
@ 2026-04-14 8:15 ` Huacai Chen
2026-04-14 10:03 ` Miguel Ojeda
1 sibling, 0 replies; 4+ messages in thread
From: Huacai Chen @ 2026-04-14 8:15 UTC (permalink / raw)
To: WANG Rui
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Miguel Ojeda, Nathan Chancellor, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
James Clark, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Nick Desaulniers, Bill Wendling, Justin Stitt,
linux-perf-users, linux-kernel, rust-for-linux, llvm, loongarch,
Haiyong Sun
On Tue, Apr 14, 2026 at 4:05 PM WANG Rui <r@hev.cc> wrote:
>
> From: Haiyong Sun <sunhaiyong@loongson.cn>
>
> Add missing CLANG_TARGET_FLAGS_loongarch and RUST_TARGET_FLAGS_loongarch
> so that perf can be built with clang and enable rust cross compilation.
>
> Signed-off-by: Haiyong Sun <sunhaiyong@loongson.cn>
> Signed-off-by: WANG Rui <r@hev.cc>
Acked-by: Huacai Chen <chenhuacai@loongson.cn>
> ---
> tools/perf/Makefile.config | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 15fbba9f4..1340744a6 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -27,6 +27,7 @@ CFLAGS += -fno-strict-aliasing
> ifeq ($(CC_NO_CLANG), 0)
> CLANG_TARGET_FLAGS_arm := arm-linux-gnueabi
> CLANG_TARGET_FLAGS_arm64 := aarch64-linux-gnu
> + CLANG_TARGET_FLAGS_loongarch := loongarch64-linux-gnu
> CLANG_TARGET_FLAGS_m68k := m68k-linux-gnu
> CLANG_TARGET_FLAGS_mips := mipsel-linux-gnu
> CLANG_TARGET_FLAGS_powerpc := powerpc64le-linux-gnu
> @@ -1167,6 +1168,7 @@ ifndef NO_RUST
> ifneq ($(CROSS_COMPILE),)
> RUST_TARGET_FLAGS_arm := arm-unknown-linux-gnueabi
> RUST_TARGET_FLAGS_arm64 := aarch64-unknown-linux-gnu
> + RUST_TARGET_FLAGS_loongarch := loongarch64-unknown-linux-gnu
> RUST_TARGET_FLAGS_m68k := m68k-unknown-linux-gnu
> RUST_TARGET_FLAGS_mips := mipsel-unknown-linux-gnu
> RUST_TARGET_FLAGS_powerpc := powerpc64le-unknown-linux-gnu
> --
> 2.53.0
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf build: Add clang and rust target flags for loongarch
2026-04-14 8:05 [PATCH] perf build: Add clang and rust target flags for loongarch WANG Rui
2026-04-14 8:15 ` Huacai Chen
@ 2026-04-14 10:03 ` Miguel Ojeda
2026-04-14 14:03 ` Dmitry Dolgov
1 sibling, 1 reply; 4+ messages in thread
From: Miguel Ojeda @ 2026-04-14 10:03 UTC (permalink / raw)
To: WANG Rui, Dmitrii Dolgov
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Miguel Ojeda, Nathan Chancellor, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
James Clark, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Nick Desaulniers, Bill Wendling, Justin Stitt,
linux-perf-users, linux-kernel, rust-for-linux, llvm, loongarch,
Haiyong Sun
On Tue, Apr 14, 2026 at 10:05 AM WANG Rui <r@hev.cc> wrote:
>
> From: Haiyong Sun <sunhaiyong@loongson.cn>
>
> Add missing CLANG_TARGET_FLAGS_loongarch and RUST_TARGET_FLAGS_loongarch
> so that perf can be built with clang and enable rust cross compilation.
>
> Signed-off-by: Haiyong Sun <sunhaiyong@loongson.cn>
> Signed-off-by: WANG Rui <r@hev.cc>
FWIW, sounds good. I guess the commit that added the list should have
had it to begin with? Cc Dmitrii.
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Cheers,
Miguel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf build: Add clang and rust target flags for loongarch
2026-04-14 10:03 ` Miguel Ojeda
@ 2026-04-14 14:03 ` Dmitry Dolgov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Dolgov @ 2026-04-14 14:03 UTC (permalink / raw)
To: Miguel Ojeda
Cc: WANG Rui, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Miguel Ojeda, Nathan Chancellor, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
James Clark, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Nick Desaulniers, Bill Wendling, Justin Stitt,
linux-perf-users, linux-kernel, rust-for-linux, llvm, loongarch,
Haiyong Sun
> On Tue, Apr 14, 2026 at 12:03:31PM +0200, Miguel Ojeda wrote:
>
> FWIW, sounds good. I guess the commit that added the list should have
> had it to begin with? Cc Dmitrii.
Yep, it should have -- as far as I can tell perf supports loongarch in
all the other ways. Unfortunately I based my patch on
CLANG_TARGET_FLAGS, which turned out to be missing this arch as well.
Acked-by: Dmitrii Dolgov <9erthalion6@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-14 14:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-14 8:05 [PATCH] perf build: Add clang and rust target flags for loongarch WANG Rui
2026-04-14 8:15 ` Huacai Chen
2026-04-14 10:03 ` Miguel Ojeda
2026-04-14 14:03 ` Dmitry Dolgov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox