TCC-DOC(1) Tiny C Compiler TCC-DOC(1) (NAME) tcc - C (SYNOPSIS) : tcc [options] [infile1 infile2...] [-run infile args...] (DESCRIPTION) TCC gcc . TCC . : "tcc -run a.c" a.c "tcc -run a.c arg1" a.c . arg1 main() a.c . "tcc a.c -run b.c arg1" a.c b.c . arg1 main() . "tcc -o myprog a.c b.c" a.c b.c myprog. "tcc -o myprog a.o b.o" a.o b.o myprog. "tcc -c a.c" a.c (object file) a.o. "tcc -c asmfile.S" C asmfile.S asmfile.o. "tcc -c asmfile.s" ( ) asmfile.s asmfile.o. "tcc -r -o ab.o a.c b.c" a.c b.c ab.o. : TCC . "#!/usr/local/bin/tcc -run" C : #!/usr/local/bin/tcc -run #include int main() { printf("Hello World\n"); return 0; } TCC - infile C . : echo 'main(){puts("hello");}' | tcc -run - -c (object file). -o outfile dll outfile. -run source [args...] source args. TCC -run : tcc "-run -L/usr/X11R6/lib -lX11" ex4.c : #!/usr/local/bin/tcc -run -L/usr/X11R6/lib -lX11 -v TCC. -vv (included). . -vvv . -bench . : -Idir include . include . include . include : /usr/local/include /usr/include PREFIX/lib/tcc/include. (PREFIX /usr /usr/local ). -isystem dir include . -nostdinc include include . -include file file . -Dsym[=val] sym val. val 1 . : -DF(a)=a+1 -Usym sym. -E stdout ( -o). -P "#line" . -P1 "#line" . -dD, -dM "#define" . -Wp,-opt -opt. : : -fno- . -funsigned-char "char" (unsigned) . -fsigned-char "char" (signed) . -fno-common (common symbols) . -fleading-underscore (underscore) C. -fms-extensions MS C . . -fdollars-in-identifiers ($) . -freverse-funcargs . -fgnu89-inline "extern inline" "static inline" . -fasynchronous-unwind-tables eh_frame [] -ftest-coverage (code coverage). executable.tcov sofile.tcov . : -w . : -Wno- . -Wimplicit-function-declaration ( prototype). -Wdiscarded-qualifiers const. -Wunsupported GCC TCC . -Wwrite-strings "const char *" "char *". -Werror . -Werror=unsupported. -Wall (-Wimplicit-function-declaration -Wdiscard-qualifiers). : -Ldir -l. /usr/local/lib /usr/lib /lib. -lxxx libxxx.so libxxx.a. -L LIBRARY_PATH . -Bdir tcc ( include) ( PREFIX/lib/tcc ). -shared . -soname name . -static ( ). -rdynamic . dlopen() . -r . -nostdlib libc C libtcc1. -Wl,-nostdlib (/usr/local/lib /usr/lib /lib). -L LIBRARY_PATH . -Wl,-rpath=path . -Wl,-Ipath -Wl,--dynamic-linker=path ELF ( ). LD_SO ( ) . -Wl,--enable-new-dtags ELF DT_RUNPATH DT_RPATH..IP -Wl,--oformat=fmt 4 fmt . : "elf32-i386" ELF () "binary" ( ) "coff" COFF ( TMS320C67xx) -Wl,--export-all-symbols -Wl,--export-dynamic (dynamic linker). dlopen() . -Wl,-subsystem=console/gui/wince/... PE (). -Wl,-[Ttext=# | section-alignment=# | file-alignment=# | image-base=# | stack=#] (layout) . -Wl,-Bsymbolic DT_SYMBOLIC. -Wl,-(no-)whole-archive / . (Debugger): -g stab : " test.c:68: in function 'test5()': dereferencing invalid pointer" "Segmentation fault". -gdwarf[-x] dwarf stab. -b /. -g . -bt[N] N (stack trace). -g -b . "__TCC_BACKTRACE__" . . " int tcc_backtrace(const char *fmt, ...); " . : -std=version "__STDC_VERSION__": 201112 version c11 gnu11 199901. -x[c|a|b|n] : C (assembly) (binary) (none). -O[n] -D__OPTIMIZE__ -O0. -pthread -D_REENTRANT -lpthread. -M makefile . -MM -M . -MD makefile . -MMD -MD . -MF depfile depfile -MD. -MP (target). -print-search-dirs include tcc . -dumpversion . -dt -run/-E: 'test_...' (Target): -mms-bitfields (bitfield) MSVC . gcc . -mfloat-abi (ARM only) ABI . : "softfp" "hard" -mno-sse sse x86_64. -m32, -m64 (cross compiler) i386/x86_64. : GCC -fx -mx ..SH " (ENVIRONMENT)" tcc . CPATH C_INCLUDE_PATH (:) include -I . LIBRARY_PATH (:) -l -L . (SEE ALSO) cpp(1), gcc(1) (AUTHORS) Fabrice Bellard 0.9.28rc 2026-02-02 TCC-DOC(1)