Files
velzieandClaude Opus 5.5 613037a66f gexcc: -fgex-guest-i386, a program that runs i386 code of its own
<gex/i386.h> and rt/i386.c: gex_i386_call runs i386 code from the
program (cdecl or stdcall words, EDX:EAX or ST0), through gex's function
table to a return pad, as native Wine's gexrt does; GEX_I386_ENTRY and
gex_i386_bind let i386 code call the program back, its C running on the
guest thread's stack below the guest's frames, nested to any depth. The
link adds rt/i386.o and the container's flags (--guest-i386
--linux-space). install.sh builds the object against the gex_abi.h of an
x86 gexc; without one the flag is refused at link time.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_c8c04c00da9a4525ab21b0b9f146c598
2026-10-27 19:48:15 -04:00
..

gexcc

A C and C++ compiler for gex's wasm32 Linux target, used like gcc. It compiles with clang (--target=wasm32-unknown-linux-musl) against its own sysroot: musl with gex's wasm32 port, libgex and compiler-rt. A linked program is a position-independent wasm module in the ELF container that gexc runs. On an x86 Linux build machine the container also runs itself under gexc, so configure checks and test suites can run it like a native binary.

tools/gexcc/install.sh PREFIX        # PREFIX/bin/gexcc, gexc++, the sysroot
PREFIX/bin/gexcc -O2 -o hello hello.c
gexc run hello

Libraries are static by default. -shared writes an archive, so a build that insists on libfoo.so still links. With GEXCC_SHARED=1, -shared writes a real wasm side module instead, which gex's loader binds at run time. The debdemo repository builds Debian packages with gexcc and assembles a Debian root filesystem around them. The gexcc script's header lists its options and environment.