PROPHET/OS
NAME
cc: the C compiler of ProphetCC on ProphetOS, one command for every target
SYNOPSIS
cc [-S | -c] [-o out] [-O0..3] [-mno-sse] [-mbmi] [-mbmi2] [-mfsrm] [-march=x86-64-v3] [-fstack-protector[-strong|-all]] [-g] [--explain-loops] [-I dir] [-D name[=value]] [-U name] [--target=x86_64|aarch64|sm86] [--stage NAME] <file.c>
DESCRIPTION
The C compiler of ProphetCC on ProphetOS, one command for every target. Without a target it compiles for the machine it runs on.
cc prog.c the object prog.o (ELF), x86_64 or aarch64
cc -S prog.c the assembler text prog.s
cc -o x.o prog.c the object under another name
cc -O0 prog.c no optimisation; -O2 is the default
cc --target=aarch64 prog.c for the other machine
cc -mno-sse prog.c no float or vector register (as the kernel builds);
-mgeneral-regs-only is the same
cc -march=x86-64-v3 prog.c may use BMI1 and BMI2 (andn, rorx); -mbmi and
-mbmi2 each alone; without, it runs on every x86_64
cc -fstack-protector-strong prog.c a canary in every function with a local
array, checked at its returns; -all in every one
cc -g -S prog.c the source lines as .file and .loc in the text,
for a debugger of another system for now
cc --target=sm86 kern.c the kernel k for NVIDIA's SM 8.6 as kern.psm
(--stage vertex or fragment for a graphics stage)
The preprocessor runs inside: -I, -D and -U as cpp takes them. Linking a program from the objects is ld's job for now.
gpucc is the shell's alias for cc --target=sm86 (/system/config/aliases).
EXAMPLE
$ cc --help cc [-S | -c] [-o out] [-O0..3] [-mno-sse] [-mbmi] [-mbmi2] [-mfsrm] [-march=x86-64-v3] [-fstack-protector[-strong|-all]] [-g] [--explain-loops] [-I dir] [-D name[=value]] [-U name] [--target=x86_64|aarch64|sm86] [--stage NAME] <file.c> compiles C for the machine it runs on, or the named target: the object file.o (-c, the default), the assembler text (-S), or for sm86 the kernel k as a PSM2 file (--stage vertex or fragment) 0 when it is written, 1 when the source is refused, 2 on an error of a file or of memory