rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: Jamie Cunliffe <Jamie.Cunliffe@arm.com>
Cc: catalin.marinas@arm.com, lina@asahilina.net,
	linux-arm-kernel@lists.infradead.org, ojeda@kernel.org,
	rust-for-linux@vger.kernel.org, steve.capper@arm.com,
	will@kernel.org
Subject: Re: [PATCH v2 1/3] arm64: rust: Enable Rust support for AArch64
Date: Tue, 15 Aug 2023 11:00:06 -0700	[thread overview]
Message-ID: <ZNu9JhYlsFWmliQE@boqun-archlinux> (raw)
In-Reply-To: <ZJ3fhb8QYdXhGl1r@boqun-archlinux>

On Thu, Jun 29, 2023 at 12:46:13PM -0700, Boqun Feng wrote:
> On Mon, Jun 12, 2023 at 04:26:39PM +0100, Jamie Cunliffe wrote:
> > > I don't think you need "-fp-armv8" here, because "aarch64-unknown-none"
> > > target doesn't have the target-feature "fp-arm64":
> > > 
> > > 	rustc +1.68.2 --print cfg --target aarch64-unknown-none | grep target_feature
> > > 
> > > 	target_feature="neon"
> > > 
> > > , and having the "-fp-armv8" gave me a warning at compile time:
> > > 
> > > 	  RUSTC L rust/core.o warning: unknown feature specified for `-Ctarget-feature`: `fp-armv8`
> > > 	  |
> > > 	  = note: it is still passed through to the codegen backend
> > > 	  = help: consider filing a feature request
> > 
> > Rust removed the fp feature for arm64 and tied it with Neon. However
> > this initially had a bug that meant it couldn't be disabled. This has
> > now been fixed in https://github.com/rust-lang/rust/pull/107294 so
> > once we can update rustc we can fix that warning by removing the
> > `-fp-armv8`. Until we do that we still need the `-fp-armv8` otherwise
> > we will get some floating point usage. This can be seen by doing an
> > objdump of core.o if you build after removing the `-fp-armv8`.
> > 
> 
> Thanks for the information (and the fix)! That's good to know. Looks
> like the fix will be in 1.71, then agree, we should keep `-fp-armv8`
> until we update to 1.71 or later.
> 

Just FYI, rustc has been bumped to 1.71:

	https://lore.kernel.org/rust-for-linux/CANiq72mrzALO3J2VvDntscXwt7Z9KzT4+S8sc_HGc8u8izjyLw@mail.gmail.com/

BTW, recently I learned that ARCH is set as "x86" by default even on
x86_64 host, so things like:

	+ifeq ($(ARCH),x86_64)
	+$(obj)/core.o: scripts/target.json
	+endif

"ifeq .." will return false if compiled with "make LLVM=1" even on a
x86_64 host. Maybe use

	ifdef CONFIG_X86_64

?

Regards,
Boqun

> Regards,
> Boqun
> 
> > 
> > You can also see that fp-armv8 is enabled in the aarch64-unknown-none target
> > here: https://raw.githubusercontent.com/rust-lang/rust/master/compiler/rustc_target/src/spec/aarch64_unknown_none.rs
> > 
> > 
> > Thanks,
> > Jamie.

  reply	other threads:[~2023-08-15 18:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06 14:56 [PATCH v2 0/3] Rust enablement for AArch64 Jamie Cunliffe
2023-06-06 14:56 ` [PATCH v2 1/3] arm64: rust: Enable Rust support " Jamie Cunliffe
2023-06-09 17:47   ` Boqun Feng
2023-06-12 15:26     ` Jamie Cunliffe
2023-06-29 19:46       ` Boqun Feng
2023-08-15 18:00         ` Boqun Feng [this message]
2023-06-06 14:56 ` [PATCH v2 2/3] arm64: rust: Enable PAC support for Rust Jamie Cunliffe
2023-06-06 14:56 ` [PATCH v2 3/3] arm64: Restrict Rust support to little endian only Jamie Cunliffe
2023-06-06 15:25 ` [PATCH v2 0/3] Rust enablement for AArch64 Miguel Ojeda
2023-06-09 18:34 ` Boqun Feng

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=ZNu9JhYlsFWmliQE@boqun-archlinux \
    --to=boqun.feng@gmail.com \
    --cc=Jamie.Cunliffe@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=lina@asahilina.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=steve.capper@arm.com \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).