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

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


The following commit(s) were added to refs/heads/master by this push:
     new 3d446bd674e tools/rust: Move NuttX Rust target specs into nuttx
3d446bd674e is described below

commit 3d446bd674ee7112ee1c8bfa5378b054d2408618
Author: Shoji Tokunaga <[email protected]>
AuthorDate: Sun May 31 17:37:58 2026 +0900

    tools/rust: Move NuttX Rust target specs into nuttx
    
    Move the NuttX-specific Rust target specification files from apps/tools
    to nuttx/tools so files with the same purpose are kept in one place.
    
    The existing aarch64 Mach-O target spec for macOS simulator builds
    already lives under nuttx/tools. Keeping the remaining NuttX Rust target
    specs there as well makes the layout consistent and lets both Make and
    CMake builds refer to target specs from the NuttX tree.
    
    Signed-off-by: Shoji Tokunaga <[email protected]>
---
 tools/aarch64-unknown-nuttx.json | 42 ++++++++++++++++++++++++++++++++++++++++
 tools/i486-unknown-nuttx.json    | 33 +++++++++++++++++++++++++++++++
 tools/x86_64-unknown-nuttx.json  | 36 ++++++++++++++++++++++++++++++++++
 3 files changed, 111 insertions(+)

diff --git a/tools/aarch64-unknown-nuttx.json b/tools/aarch64-unknown-nuttx.json
new file mode 100644
index 00000000000..04a333616fb
--- /dev/null
+++ b/tools/aarch64-unknown-nuttx.json
@@ -0,0 +1,42 @@
+{
+  "arch": "aarch64",
+  "crt-objects-fallback": "false",
+  "data-layout": 
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32",
+  "default-uwtable": true,
+  "disable-redzone": true,
+  "features": "+v8a,+strict-align,+neon",
+  "linker": "rust-lld",
+  "linker-flavor": "gnu-lld",
+  "llvm-target": "aarch64-unknown-nuttx",
+  "max-atomic-width": 128,
+  "metadata": {
+    "description": "aarch64 target for NuttX RTOS",
+    "host_tools": false,
+    "std": true,
+    "tier": 3
+  },
+  "os": "nuttx",
+  "panic-strategy": "abort",
+  "pre-link-args": {
+    "gnu": [
+      "--fix-cortex-a53-843419"
+    ],
+    "gnu-lld": [
+      "--fix-cortex-a53-843419"
+    ]
+  },
+  "relocation-model": "static",
+  "stack-probes": {
+    "kind": "inline"
+  },
+  "supported-sanitizers": [
+    "kcfi",
+    "kernel-address",
+    "kernel-hwaddress"
+  ],
+  "supports-xray": true,
+  "target-family": [
+    "unix"
+  ],
+  "target-pointer-width": 64
+}
diff --git a/tools/i486-unknown-nuttx.json b/tools/i486-unknown-nuttx.json
new file mode 100644
index 00000000000..93cd434185a
--- /dev/null
+++ b/tools/i486-unknown-nuttx.json
@@ -0,0 +1,33 @@
+{
+  "arch": "x86",
+  "cpu": "i486",
+  "crt-objects-fallback": "false",
+  "data-layout": 
"e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
+  "features": 
"-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2,+soft-float",
+  "default-dwarf-version": 2,
+  "dynamic-linking": true,
+  "has-rpath": true,
+  "has-thread-local": true,
+  "linker-flavor": "gnu-lld",
+  "llvm-target": "i486-unknown-nuttx",
+  "max-atomic-width": 64,
+  "metadata": {
+    "description": "32-bit x86, resricted to i486",
+    "host_tools": false,
+    "std": true,
+    "tier": 3
+  },
+  "no-default-libraries": true,
+  "os": "nuttx",
+  "position-independent-executables": false,
+  "relro-level": "full",
+  "rustc-abi": "x86-softfloat",
+  "stack-probes": {
+    "kind": "inline"
+  },
+  "target-family": [
+    "unix"
+  ],
+  "target-mcount": "__mcount",
+  "target-pointer-width": 32
+}
diff --git a/tools/x86_64-unknown-nuttx.json b/tools/x86_64-unknown-nuttx.json
new file mode 100644
index 00000000000..d12fecb8a74
--- /dev/null
+++ b/tools/x86_64-unknown-nuttx.json
@@ -0,0 +1,36 @@
+{
+  "arch": "x86_64",
+  "cpu": "x86-64",
+  "crt-objects-fallback": "false",
+  "data-layout": 
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
+  "disable-redzone": true,
+  "features": 
"-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2,+soft-float",
+  "linker": "rust-lld",
+  "linker-flavor": "gnu-lld",
+  "llvm-target": "x86_64-unknown-nuttx",
+  "max-atomic-width": 64,
+  "metadata": {
+    "description": "x86_64 target for NuttX RTOS with softfloat",
+    "host_tools": false,
+    "std": true,
+    "tier": 3
+  },
+  "panic-strategy": "abort",
+  "plt-by-default": false,
+  "position-independent-executables": true,
+  "relro-level": "full",
+  "rustc-abi": "x86-softfloat",
+  "stack-probes": {
+    "kind": "inline"
+  },
+  "static-position-independent-executables": true,
+  "supported-sanitizers": [
+    "kcfi",
+    "kernel-address"
+  ],
+  "os": "nuttx",
+  "target-family": [
+    "unix"
+  ],
+  "target-pointer-width": 64
+}
\ No newline at end of file

Reply via email to