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 <huangqi3@xiaomi.com>
This commit is contained in:
parent
a2e8bb83a4
commit
abcbb1eebd
1 changed files with 3 additions and 3 deletions
|
|
@ -38,13 +38,13 @@ ifeq ($(CONFIG_ARCH_SIM),y)
|
||||||
ifeq ($(CONFIG_HOST_LINUX),y)
|
ifeq ($(CONFIG_HOST_LINUX),y)
|
||||||
ifeq ($(LLVM_ARCHTYPE),x86)
|
ifeq ($(LLVM_ARCHTYPE),x86)
|
||||||
# Only for x86 based host or x64 but m32 build
|
# Only for x86 based host or x64 but m32 build
|
||||||
RUSTFLAGS += --target i686-unknown-linux-$(LLVM_ABITYPE)
|
RUSTFLAGS += --target i686-unknown-linux-gnu
|
||||||
else
|
else
|
||||||
# For other archs, such as aarch64, arm etc
|
# For other archs, such as aarch64, arm etc
|
||||||
RUSTFLAGS += --target $(LLVM_ARCHTYPE)-unknown-linux-$(LLVM_ABITYPE)
|
RUSTFLAGS += --target $(LLVM_ARCHTYPE)-unknown-linux-gnu
|
||||||
endif
|
endif
|
||||||
else ifeq ($(CONFIG_HOST_MACOS),y)
|
else ifeq ($(CONFIG_HOST_MACOS),y)
|
||||||
RUSTFLAGS += --target $(LLVM_ARCHTYPE)-apple-$(LLVM_ABITYPE)
|
RUSTFLAGS += --target $(LLVM_ARCHTYPE)-apple-darwin
|
||||||
endif
|
endif
|
||||||
else ifeq ($(CONFIG_ARCH_RISCV),y)
|
else ifeq ($(CONFIG_ARCH_RISCV),y)
|
||||||
# Target triple is riscv[32|64][isa]-unknown-none-elf
|
# Target triple is riscv[32|64][isa]-unknown-none-elf
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue