Languages: English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Français | Deutsch | Español | Italiano | Русский | العربية
A minimal C program cross-compiled to Linux ELF using NeverC. Builds from macOS, Windows, or Linux — no target system toolchain required.
NeverC bundles a Linux sysroot (Ubuntu 22.04, glibc 2.35) in runtime/linux/, so a single invocation handles preprocessing, compilation, optimization (auto-LTO), and linking via the built-in linker.
From the repo (default target: x86_64-linux-gnu):
cd examples/linux-hello
neverc make # debug: -g (default on the first build)
neverc make release # release: -O2 --strip
neverc make debug # switch back to debugThe Makefile persists PROFILE, so later neverc make keeps the same
debug/release selection. Release uses NeverC's integrated --strip:
debug metadata and unneeded static symbol names are removed while
loader/dynamic ABI names that the binary still needs are preserved.
See Release builds.
Build for AArch64:
neverc make TARGET=aarch64-linux-gnuFrom a standalone NeverC release:
neverc make NEVERC=/path/to/nevercneverc --target=x86_64-linux-gnu -Wall -o hello main.cCopy hello to a Linux machine (or Docker container) and execute:
chmod +x hello
./hello- Prints a greeting with command-line arguments
- Demonstrates
printf,strncpy,strlen,atoifrom the bundled libc - XOR-transforms a string to verify basic integer/character operations