Downloads
The current release line is xcc 0.74. One install contains the whole toolchain: the
compiler (xcc, which runs every stage itself, from parsing through code generation
for all seven targets to assembly and linking), the signing tool (xcc-sign), the
6502 assembler (xcc-as), the simulators (xcc-sim-6502, xcc-sim-68k), the
complete standard library, and the Linux (musl) and Windows (mingw) link pools. A single machine can
cross-build native binaries for every target with no other toolchain installed.
| Platform | Download | Size |
|---|---|---|
| macOS (Apple silicon) | xcc-osx-0.74.tar.bz2 | 8.8 MB |
| Linux (x86_64) | xcc-linux-0.74.tar.bz2 | 6.5 MB |
| Windows (x64) | xcc-win64-0.74.zip | 7.5 MB |
| arm9 sysroot (any host) | xcc-arm9-sysroot-0.74.tar.bz2 | 830 KB |
| UXKit GTK 4 library (Linux x86_64) | xcc-uxgtk-linux-0.74.tar.bz2 | 110 KB |
| UXKit library (macOS arm64, Windows x64, Linux x86_64, web) | xcc-uxkit-0.74.tar.bz2 | 2.7 MB |
Every archive contains the same compiler. Each host build cross-compiles to all targets, so the platform you download for decides only where the compiler runs.
The arm9 sysroot is the one extra piece, and only for -A arm9: that target links
against the XTOS loader’s libc.so and reads the C library out of its DWARF, so
that one file has to be on the library search path. Every other target is complete
in the host archive.
tar xjf xcc-osx-0.74.tar.bz2export PATH="$PWD/xcc-osx-0.74/bin:$PATH"xcc -vThe compiler finds its libraries relative to its own binary, with no flags,
environment variables or fixed install path, so you can move the directory anywhere.
The binaries are not notarised, so the first run on a fresh macOS install may need a
one-time Gatekeeper override (xattr -dr com.apple.quarantine xcc-osx-0.74/).
arm9 sysroot
Section titled “arm9 sysroot”Needed only for -A arm9. Unpack it anywhere and point -L at it:
tar xjf xcc-arm9-sysroot-0.74.tar.bz2xcc -A arm9 -L path/to/xcc-arm9-sysroot-0.74 -o prog.so prog.xcIt holds one file: libc.so, newlib 4.4.0.20231231 rebuilt as position-independent
code for the Cortex-A9, plus the loader’s directory and malloc-lock support. BSD-style
licensed throughout — COPYING.NEWLIB and NOTICE are in the archive — so linking
against it places no obligation on your program.
Compiling is what this archive is for. Running an arm9 binary also needs an XTOS kernel to host it, which is not distributed here.
make install also vendors a sysroot into lib/xc/arm9-sysroot/ when it can find
one, and then -A arm9 needs no -L at all.
UXKit GTK 4 library
Section titled “UXKit GTK 4 library”Needed only for a Linux GUI program built with UXKit’s GTK back end. The
program is a glibc executable that loads GTK 4, which is how -A x86_64 links
by default from 0.72:
tar xjf xcc-uxgtk-linux-0.74.tar.bz2xcc -A x86_64 app.xc -L xcc-uxgtk-linux-0.74 -lUXGtk -lgtk-4 -o appThe machine that runs the program needs glibc 2.34 or later and GTK 4; this
build is against GTK 4.22, and an older GTK 4 may lack a symbol it uses. Linking
from a Mac also needs a copy of the target’s libgtk-4.so on the -L path.
UXKit is LGPLv3: the archive carries the library’s source and a script that
rebuilds it against any machine’s GTK 4.
UXKit library
Section titled “UXKit library”UXKit built as a library for macOS (arm64), Windows (x64), Linux (x86_64) and the
web, for xcc 0.74. Put its 3p/ beside the versioned install, so that
/opt/xcc/3p/uxkit/ sits next to /opt/xcc/0.74/:
tar xjf xcc-uxkit-0.74.tar.bz2sudo cp -R xcc-uxkit-0.74/3p /opt/xcc/A program then names UXKit once, with #use <UXKit>, and builds with nothing
else: xcc -A arm64 app.xc -o app. On Windows ship libUXKit.dll beside the
program; on Linux libUXKit.so and libUXGtk.so (the machine needs GTK 4); on
the web libUXKit.wasm, libUXKit.json and the two ux_web_*.js files. UXKit
is LGPLv3; the archive carries its source and the script that rebuilds it.
tar xjf xcc-linux-0.74.tar.bz2export PATH="$PWD/xcc-linux-0.74/bin:$PATH"xcc -vThe binaries are static (musl), so they run on any x86_64 distribution with no library dependencies.
Windows
Section titled “Windows”Unzip xcc-win64-0.74.zip anywhere and add the folder to PATH (or invoke
xcc.exe by path). The binaries are self-contained; no runtime installer is
needed.
First build
Section titled “First build”// hello.xc — no imports needed: Log is ambient on every target.void main(void) { Log.info("hello from %s", "xcc");}xcc -o hello hello.xc # native binary for this machine, like cc./helloThe same file cross-compiles to every target by picking an architecture:
xcc -A x86_64 -o hello-linux hello.xc # Linux ELF against glibc (-static: self-contained, musl)xcc -A win64 -o hello.exe hello.xc # Windows PExcc -A wasm32 -o hello hello.xc # hello.wasm + a Node/browser loaderxcc -A 6502 -o hello.xex hello.xc # banked 6502 executable (run: xcc-sim-6502 -m xt hello.xex)Next, Compiler usage → CLI reference covers the common flags,
and Install covers a system-wide make install.
Older archives are on the Historical Releases page, and the ChangeLog lists what changed per version.