[Bug 280305] Mk/Uses/cargo.mk: Remove cross-compilation options

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 15 Jul 2024 19:01:16 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280305

            Bug ID: 280305
           Summary: Mk/Uses/cargo.mk: Remove cross-compilation options
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: yuri@freebsd.org

Created attachment 252086
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=252086&action=edit
patch

According to this comment
(https://github.com/rust-lang/rust/issues/127727#issuecomment-2229073731), the
--target xx option, turned on by CARGO_BUILD_TARGET in cargo.mk, enables the
cross-comilation mode in the Rust compiler.

Cross compilation shouldn't be turned on by default in the FreeBSD ports.
If cross-compilation is desired, it should be turned on by dedicated variables
in ports' makefiles or in /etc/make.conf.

According to the linked above conversation cross-compilation causes some
RUSTFLAGS to not be passed to some rustc commands. In particular, removal of
cross-compilation would fix build failures in many rust-based ports on the i386
architecture, for example in devel/cargo-spellcheck.

The attached patch removes cross-compilation options from cargo.mk

-- 
You are receiving this mail because:
You are the assignee for the bug.