Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Li Fangxu" <lifangxu22@gmail.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf build: Add rust target flag for loongarch cross compile
Date: Fri, 21 Aug 2026 03:35:03 +0000	[thread overview]
Message-ID: <20260821033504.0C8991F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260821032702.4258-1-lifangxu22@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing RUST_TARGET_FLAGS alias for loongarch64.
--

--- Patch [1]: [PATCH] perf build: Add rust target flag for loongarch cross compile ---
commit b2d0a9ab160e1b008ff911474976ee4d8ac95e11
Author: lifangxu <lifangxu@kylinos.cn>

perf build: Add rust target flag for loongarch cross compile

This commit adds the loongarch rust target flag to fix perf cross
compilation errors for the architecture.

> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 0ba307e78fe1f..42c0ef2137502 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
[ ... ]
> @@ -1149,6 +1149,8 @@ ifndef NO_RUST
>      RUST_TARGET_FLAGS_s390	:= s390x-unknown-linux-gnu
>      RUST_TARGET_FLAGS_x86	:= x86_64-unknown-linux-gnu
>      RUST_TARGET_FLAGS_x86_64	:= x86_64-unknown-linux-gnu
> +    RUST_TARGET_FLAGS_loongarch := loongarch64-unknown-linux-gnu
> +

[Severity: Low]
Should there also be an alias for loongarch64 defined here?

Since tools/scripts/Makefile.arch accepts ARCH=loongarch64 but this
makefile config evaluates $(ARCH) directly, a build invoked with
ARCH=loongarch64 will evaluate RUST_TARGET_FLAGS_$(ARCH) as
RUST_TARGET_FLAGS_loongarch64.

Will this cause the build to fail with the unknown architecture error
because that specific alias is missing?

>  
>      ifeq ($(RUST_TARGET_FLAGS_$(ARCH)),)
>        $(error Unknown rust cross compilation architecture $(ARCH))

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260821032702.4258-1-lifangxu22@gmail.com?part=1

  reply	other threads:[~2026-08-21  3:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21  3:27 [PATCH] perf build: Add rust target flag for loongarch cross compile Li Fangxu
2026-08-21  3:35 ` sashiko-bot [this message]
2026-08-21  6:56 ` WANG Rui
2026-08-21 10:38   ` Li Fangxu

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=20260821033504.0C8991F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=lifangxu22@gmail.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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