This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit abcbb1eebd2c7186e2f0e5683eec490b905b49c0
Author: Huang Qi <huang...@xiaomi.com>
AuthorDate: Mon Jan 27 22:43:38 2025 +0800

    tools/Rust.defs: Use 'gnu' target for Linux and 'darwin' for macOS
    
    Summary:
    - Updated `Rust.defs` to use `gnu` as the target for Linux systems and 
`darwin` for macOS systems
    - This change aligns with Rust toolchain conventions, where `gnu` is used 
to declare the system environment rather than the actual ABI name (e.g., `sysv`)
    
    Impact:
    - No functional changes - the Rust toolchain interprets `gnu` correctly for 
Linux targets
    - Improves consistency with Rust toolchain conventions and reduces 
potential confusion
    - Maintains compatibility with existing Rust builds on Linux and macOS 
systems
    
    Signed-off-by: Huang Qi <huang...@xiaomi.com>
---
 tools/Rust.defs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/Rust.defs b/tools/Rust.defs
index c3ca78298c..42ccffb37c 100644
--- a/tools/Rust.defs
+++ b/tools/Rust.defs
@@ -38,13 +38,13 @@ ifeq ($(CONFIG_ARCH_SIM),y)
   ifeq ($(CONFIG_HOST_LINUX),y)
     ifeq ($(LLVM_ARCHTYPE),x86)
       # Only for x86 based host or x64 but m32 build
-      RUSTFLAGS += --target i686-unknown-linux-$(LLVM_ABITYPE)
+      RUSTFLAGS += --target i686-unknown-linux-gnu
     else
       # For other archs, such as aarch64, arm etc
-      RUSTFLAGS += --target $(LLVM_ARCHTYPE)-unknown-linux-$(LLVM_ABITYPE)
+        RUSTFLAGS += --target $(LLVM_ARCHTYPE)-unknown-linux-gnu
     endif
   else ifeq ($(CONFIG_HOST_MACOS),y)
-    RUSTFLAGS += --target $(LLVM_ARCHTYPE)-apple-$(LLVM_ABITYPE)
+    RUSTFLAGS += --target $(LLVM_ARCHTYPE)-apple-darwin
   endif
 else ifeq ($(CONFIG_ARCH_RISCV),y)
   # Target triple is riscv[32|64][isa]-unknown-none-elf

Reply via email to