Cross-compilation with GCC skill for embedded and multi-architecture targets.

MITAuto-check: notes

Install Cross Gcc

skills CLI
$ npx skills add mohitmishra786/low-level-dev-skills --skill cross-gcc -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mohitmishra786/low-level-dev-skills cross-gcc --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/compilers/cross-gcc .claude/skills/cross-gcc && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cross-gcc
GitHub stars
252
Token cost
~1.3k tokens
SKILL.md length
304 words
Files
2 (incl. references)
Skills in repo
138
Repo updated
First seen
Licence
MIT

At a glance

Cross-compilation with GCC skill for embedded and multi-architecture targets.

  • Works in 9 steps: Understand the triplet → Install the toolchain → Basic cross-compilation → …
  • Setting up cross-gcc toolchains
  • SKILL.md covers Purpose, Triggers, Workflow and Related skills
  • Calls apt and cmake

What it does

Cross Gcc is an agent skill from mohitmishra786/low-level-dev-skills. Cross-compilation with GCC skill for embedded and multi-architecture targets. Use when setting up cross-gcc toolchains, configuring sysroots, building for ARM/AArch64/RISC-V/MIPS from an x86-64 host, troubleshooting wrong-architecture errors, or running cross-compiled binaries under QEMU. Activates on queries about cross-compilation triplets, sysroot, pkg-config for cross builds, embedded toolchains, or Yocto/Buildroot integration.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/arm-flags.md`).

It works with Linux. The repository describes itself as: A curated suite of AI agent skills for systems and low-level programming with C/C++, Rust, and Zig toolchains, covering compilers, debuggers, profilers, build systems…. The licence is MIT.

When your agent uses it

  • Setting up cross-gcc toolchains
  • Configuring sysroots
  • Building for ARM/AArch64/RISC-V/MIPS from an x86-64 host
  • Troubleshooting wrong-architecture errors

Example prompts

  • “/cross-gcc”

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Understand the triplet
  2. Install the toolchain
  3. Basic cross-compilation
  4. Sysroot
  5. pkg-config for cross builds
  6. CMake cross-compilation
  7. Test with QEMU
  8. Common errors
  9. Environment variables

What it can do on your machine

Read from SKILL.md and the folder at commit bdc5847. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • apt
    • cmake

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cross Gcc loads about 1.3k tokens when it runs, and up to ~1.8k if it reads all its reference files. Until then it costs about 111 tokens; SKILL.md has 304 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~111
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:39
    sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
  • NoteRuns commands with sudoSKILL.md:42
    sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
  • NoteRuns commands with sudoSKILL.md:120
    sudo apt install qemu-user-static

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mohitmishra786/low-level-dev-skills at commit bdc5847, republished under its MIT licence (© mohitmishra786). 304 words, ~1,342 tokens.

Download SKILL.mdSave it as .claude/skills/cross-gcc/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
cross-gcc
description
Cross-compilation with GCC skill for embedded and multi-architecture targets. Use when setting up cross-gcc toolchains, configuring sysroots, building for ARM/AArch64/RISC-V/MIPS from an x86-64 host, troubleshooting wrong-architecture errors, or running cross-compiled binaries under QEMU. Activates on queries about cross-compilation triplets, sysroot, pkg-config for cross builds, embedded toolchains, or Yocto/Buildroot integration.

Cross-GCC

Purpose

Guide agents through setting up and using cross-compilation GCC toolchains: triplets, sysroots, pkg-config, QEMU-based testing, and common failure modes.

Triggers

  • "How do I compile for ARM on my x86 machine?"
  • "I'm getting 'wrong ELF class' or 'cannot execute binary file'"
  • "How do I set up a sysroot for cross-compilation?"
  • "pkg-config returns host libraries in my cross build"
  • "How do I debug a cross-compiled binary with QEMU + GDB?"

Workflow

1. Understand the triplet

A GNU triplet has the form <arch>-<vendor>-<os>-<abi> (often 3 or 4 parts):

TripletTarget
aarch64-linux-gnu64-bit ARM Linux (glibc)
arm-linux-gnueabihf32-bit ARM Linux hard-float
arm-none-eabiBare-metal ARM (no OS)
riscv64-linux-gnu64-bit RISC-V Linux
x86_64-w64-mingw32Windows (MinGW) from Linux
mipsel-linux-gnuLittle-endian MIPS Linux
2. Install the toolchain
bash
# Debian/Ubuntu
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu

# For bare-metal ARM (Cortex-M)
sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi

# Verify
aarch64-linux-gnu-gcc --version
3. Basic cross-compilation
bash
# C
aarch64-linux-gnu-gcc -O2 -o hello hello.c

# C++
aarch64-linux-gnu-g++ -O2 -std=c++17 -o hello hello.cpp

# Bare-metal (no stdlib, no OS)
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 \
    -ffreestanding -nostdlib -T linker.ld -o firmware.elf startup.s main.c
4. Sysroot

A sysroot is a directory containing the target's headers and libraries. Required when your code links against target-specific libraries.

bash
# Use a sysroot
aarch64-linux-gnu-gcc --sysroot=/path/to/aarch64-sysroot -O2 -o prog main.c

# Common sysroot sources:
# - Raspberry Pi: download from raspbian/raspios
# - Debian multiarch: debootstrap --arch arm64 bullseye /tmp/sysroot
# - Yocto/Buildroot: generated automatically in build output

Verify the sysroot is correct:

bash
aarch64-linux-gnu-gcc --sysroot=/path/to/sysroot -v -E - < /dev/null 2>&1 | grep sysroot
5. pkg-config for cross builds

pkg-config will return host library paths by default. Override:

bash
export PKG_CONFIG_SYSROOT_DIR=/path/to/sysroot
export PKG_CONFIG_LIBDIR=${PKG_CONFIG_SYSROOT_DIR}/usr/lib/aarch64-linux-gnu/pkgconfig:${PKG_CONFIG_SYSROOT_DIR}/usr/share/pkgconfig
export PKG_CONFIG_PATH=   # clear host path

pkg-config --libs libssl  # now returns target paths
6. CMake cross-compilation

Create a toolchain file aarch64.cmake:

cmake
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)

set(CMAKE_C_COMPILER   aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)

set(CMAKE_SYSROOT /path/to/aarch64-sysroot)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
bash
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=aarch64.cmake
cmake --build build
7. Test with QEMU
bash
# User-mode emulation (Linux binaries, no full OS)
sudo apt install qemu-user-static

qemu-aarch64-static ./hello
# Or set binfmt_misc for transparent execution:
# Then just: ./hello

# GDB remote debug via QEMU
qemu-aarch64-static -g 1234 ./hello &
aarch64-linux-gnu-gdb -ex "target remote :1234" ./hello
8. Common errors
ErrorCauseFix
cannot execute binary file: Exec format errorRunning target binary on host without QEMUUse qemu-<arch>-static
wrong ELF class: ELFCLASS64 (or 32)Wrong-architecture object linkedCheck triplet; ensure all objects use same toolchain
/usr/bin/ld: cannot find -lfooHost library path used for cross-linkSet --sysroot; fix PKG_CONFIG_LIBDIR
undefined reference to '__aeabi_*'Missing ARM ABI runtimeLink with -lgcc or -lclang_rt.builtins
relocation R_AARCH64_ADR_PREL_PG_HI21 out of rangeDistance too largeUse -mcmodel=large or restructure
unrecognized opcodeWrong -mcpu or -marchSet correct CPU flags for target
9. Environment variables
bash
# Tell build systems to use cross-compiler
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
export AR=aarch64-linux-gnu-ar
export STRIP=aarch64-linux-gnu-strip
export OBJDUMP=aarch64-linux-gnu-objdump

# For autoconf projects
./configure --host=aarch64-linux-gnu --prefix=/usr

For a reference on ARM-specific GCC flags, see references/arm-flags.md.

  • Use skills/compilers/gcc for GCC flag details
  • Use skills/debuggers/gdb for remote debugging with gdbserver
  • Use skills/low-level-programming/assembly-arm for AArch64 assembly specifics
  • Use skills/build-systems/cmake for toolchain file setup

© mohitmishra786, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/compilers/cross-gcc of mohitmishra786/low-level-dev-skills.

  • SKILL.md
  • references/arm-flags.md

Open the folder on GitHubat commit bdc5847

Compare with similar skills

Cross Gcc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cross Gcc compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cross Gcc this skillmohitmishra786/low-level-dev-skills252—~1.3kAutomated safety check: NotesMIT
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Model Usageopenclaw/openclaw392k1 repos~637Automated safety check: PassMIT
Engine Whats Newflutter/flutter179k—~978Automated safety check: PassBSD-3-Clause
Openclaw Live Updateropenclaw/openclaw392k—~3.7kAutomated safety check: PassMIT
Upgrade Browserflutter/flutter179k—~1.1kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Model Usage

    openclaw/openclaw

    Summarize CodexBar local cost logs by model for Codex or Claude, including current or full breakdowns.

    392k GitHub starsUsed in 1 repo~637 tokens
    Auto-check passed
  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    179k GitHub stars~978 tokensUpdated today
    MobileAuto-check passed
  • Openclaw Live Updater

    openclaw/openclaw

    Maintain the canonical live OpenClaw main checkout, macOS LaunchAgent-managed Gateway, local macOS app, exact-head main CI, and recurring full release validation.

    392k GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Upgrade Browser

    flutter/flutter

    Upgrade browser versions (Chrome or Firefox) in the Flutter Web Engine and/or Framework tests.

    179k GitHub stars~1.1k tokensUpdated today
    MobileAuto-check passed
  • K8s Security Policies

    Cybereason-Public/owLSM

    Comprehensive guide for implementing NetworkPolicy, PodSecurityPolicy, RBAC, and Pod Security Standards in Kubernetes.

    280 GitHub starsUsed in 12 repos~2k tokens
    Backend & APIsAuto-check passed

More from mohitmishra786/low-level-dev-skills

All 138 skills in this repo
  • ARM and AArch64 Assembly

    mohitmishra786/low-level-dev-skills

    Guides reading and writing AArch64 and ARM Thumb assembly: compiler output, inline asm, registers, the AAPCS calling convention and NEON or SVE basics.

    252 GitHub stars~1.9k tokensUpdated 3 mo ago
    Auto-check passed
  • RISC-V Assembly Guide

    mohitmishra786/low-level-dev-skills

    Reference for RISC-V assembly on RV32 and RV64: register names and calling convention, extension naming, GCC and Clang inline asm, and QEMU with GDB debugging.

    252 GitHub stars~1.8k tokensUpdated 3 mo ago
    Auto-check passed
  • x86-64 Assembly Reference

    mohitmishra786/low-level-dev-skills

    Explains x86-64 registers, the System V AMD64 calling convention, and how to read compiler-generated or inline assembly.

    252 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Bazel for C and C++

    mohitmishra786/low-level-dev-skills

    Guides your agent through Bazel for C/C++ projects: BUILD files, Bzlmod dependencies, toolchain registration, remote execution, dependency queries and sandbox debugging.

    252 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Binary Hardening

    mohitmishra786/low-level-dev-skills

    Binary hardening skill for security-hardened C/C++ builds. An agent skill from mohitmishra786/low-level-dev-skills.

    252 GitHub stars~2k tokensUpdated 3 mo ago
    Auto-check passed
  • Binutils

    mohitmishra786/low-level-dev-skills

    GNU binutils skill for binary manipulation and analysis. An agent skill from mohitmishra786/low-level-dev-skills.

    252 GitHub stars~1.2k tokensUpdated 3 mo ago
    Auto-check passed

Works with

Questions about Cross Gcc

What does Cross Gcc do?

Cross-compilation with GCC skill for embedded and multi-architecture targets. Cross Gcc is an agent skill from mohitmishra786/low-level-dev-skills. Cross-compilation with GCC skill for embedded and multi-architecture targets.

When should I use Cross Gcc?

Cross Gcc fits situations like: setting up cross-gcc toolchains; configuring sysroots; building for ARM/AArch64/RISC-V/MIPS from an x86-64 host; troubleshooting wrong-architecture errors.

How do I install Cross Gcc in Claude Code?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill cross-gcc -a claude-code`. Or copy the skill folder (skills/compilers/cross-gcc in mohitmishra786/low-level-dev-skills) into .claude/skills/cross-gcc in your project. Claude Code loads it when a task matches its description.

How do I install Cross Gcc in Codex?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill cross-gcc -a codex`. Or copy the skill folder (skills/compilers/cross-gcc in mohitmishra786/low-level-dev-skills) into .agents/skills/cross-gcc in your project. Codex loads it when a task matches its description.

Can I use Cross Gcc in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mohitmishra786/low-level-dev-skills --skill cross-gcc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cross-gcc, .gemini/skills/cross-gcc, .github/skills/cross-gcc and .opencode/skills/cross-gcc in your project.

What does Cross Gcc need to run?

Going by SKILL.md and its folder, Cross Gcc needs the command-line tools its instructions call (apt and cmake).

Does Cross Gcc access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cross Gcc safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Cross Gcc use?

Cross Gcc is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cross Gcc use?

About 1.3k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 489 tokens, read only when the agent opens those files.

What are the alternatives to Cross Gcc?

Skills that share tags, products or a category with Cross Gcc: Configuring Horizon (coollabsio/coolify, 63k stars), Model Usage (openclaw/openclaw, 392k stars), Engine Whats New (flutter/flutter, 179k stars) and Openclaw Live Updater (openclaw/openclaw, 392k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cross Gcc?

mohitmishra786 (a GitHub user) maintains it in mohitmishra786/low-level-dev-skills, which has 252 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on June 27, 2026.

Source: mohitmishra786/low-level-dev-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.