Commit graph

5 commits

Author SHA1 Message Date
Ansh Rai
522ae4cb3f tools/Zig.defs: Fix Zig builds on sim:x86_64
Building Zig applications on sim:x86_64 with Zig 0.13.0 fails because
the generated target "x86_64-freestanding-sysv" is not recognized by
Zig. Introduce a Zig-specific ABI mapping that translates "sysv" to
"gnu" without affecting other toolchains.

After correcting the target ABI, linking still fails due to unresolved
references to __zig_probe_stack. Add -fcompiler-rt so Zig includes the
required compiler runtime during linking.

Verified on sim:nsh with CONFIG_EXAMPLES_HELLO_ZIG=y:

  nsh> hello_zig
  [sim]: Hello, Zig!

Fixes #19475

Signed-off-by: Ansh Rai <anshrai331@gmail.com>
2026-07-20 09:36:56 +08:00
Alin Jerpelea
c9eef2d697 tools: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-09-10 23:11:11 +08:00
Yanfeng Liu
4c41d84d21 tools/export: add hello_zig support in kernel mode for linux host
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-19 01:09:46 -08:00
Huang Qi
2650fa9509 tools/Zig: Simplify compile flags handling
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-31 16:55:15 -03:00
Huang Qi
536739d2da tools: Export LLVM style arch info for non-c language
Current Toolchain.defs set the compile flags directly, it's OK for
target specified gcc toolchain.

But some LLVM based toolchains (Rust/Zig etc) use single toolchain to handle all supported paltform.

In this patch, arch level Toolchain.defs export standard LLVM style arch flags, and let <Lang>.defs to map them into internal style,

This will simplify the intergration of non-c language.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-29 09:26:38 -03:00