kefir-cc1(1)

πŸ“¦
version 0.5.0 Β· 2 versions
, in alpine 3.24

πŸ’… kefir-cc1(1) β€” General Commands Manual πŸ’…

okay so. bestie. meet kefir-cc1, a C17/C23 language compiler β€” and the whole personality of this page is that it's the compiler core with no driver attached. Like, it's the main character before the entourage shows up. ✨


🌸 SYNOPSIS 🌸

kefir-cc1 [options] [file]

πŸ¦‹ DESCRIPTION πŸ¦‹

kefir-cc1 is a C17/C23 language compiler β€” but without a driver, iykyk. That means you feed it stuff directly, no hand-holding.

And if you don't hand it an input file at all? It just reads from stdin. no cap, it will literally wait there for you to type. 🫢


✨ OPTIONS ✨

so here's the menu. every single flag, no skipping, we don't do that here πŸ’…

  • --c17-standard β€” use the C17 language standard.
  • --c23-standard β€” use the C23 language standard.
  • --pp-timestamp timestamp β€” override the preprocessor timestamp. yes, you get to be the clock now ⏰
  • --json-errors β€” print errors in JSON format to stderr.
  • --tabular-errors β€” print errors in tabular format to stderr. tables!! for your errors!!
  • --target-profile profile β€” generate code for the specified target (peep the TARGET subsection 🎯).
  • --source-id identifier β€” force it to use the source file identifier you provide.
  • --extension-lib libpath β€” load an extension library.
  • --quote-include-dir dir β€” add a directory to the include search path exclusively for quoted includes. exclusive!! πŸ‘‘
  • --system-include-dir dir β€” add a directory to the include search path and mark it as a system include path (used for dependency output).
  • --embed-dir directory β€” add a directory to the preprocessor embed search path.
  • --debug-info β€” include debug information in the produced output. so your debugger can actually find things 😭
  • --optimizer-max-inline-depth depth β€” maximum depth of function inlining (5 by default).
  • --optimizer-max-inlines-per-func inlines β€” maximum number of inlined functions (10 by default).
  • --enable-lowering β€” perform target-specific SSA lowering β€” and heads up, this is mandatory for bit-precise integer support β€” [default].
  • --disable-lowering β€” skip target-specific SSA lowering.
  • --preprocessor-assembly-mode β€” enable assembly preprocessing mode (default for .S files). In this mode, leading '$' characters are not treated as part of an identifier.
  • --preprocessor-normal-mode β€” disable assembly preprocessing mode (default).
  • --dump-dependencies β€” output a make rule describing the dependencies of the source file.
  • --system-dependencies β€” include dependencies from system include directories in the make rule (used with the --dump-dependencies flag) [default: on].
  • --no-system-dependencies β€” do not include dependencies from system include directories in the make rule (used with the --dump-dependencies flag).
  • --add-phony-targets β€” generate phony make targets for each dependency (used with the --dump-dependencies flag) [default: off].
  • --no-add-phony-targets β€” do not generate phony make targets for each dependency (used with --dump-dependencies).
  • --dependency-target target β€” override the default make rule target (used with the --dump-dependencies flag).
  • --dependency-output filename β€” output the make rule into the specified file (used with the --dump-dependencies flag).
  • --unsigned-char β€” let the type char be unsigned. By default it's target-specific.
  • --signed-char β€” let the type char be signed. By default it's target-specific.
  • --codegen-tentative-common β€” place tentative definitions into the common section (equivalent to applying the common attribute to all variables).
  • --codegen-tentative-no-common β€” do not place tentative definitions into the common section [default].
  • --codegen-visibility-default β€” keep default visibility for all symbols [default].
  • --codegen-visibility-hidden β€” make all symbols hidden unless an attribute says otherwise.
  • --codegen-visibility-protected β€” make all symbols protected unless an attribute says otherwise.
  • --codegen-visibility-internal β€” make all symbols internal unless an attribute says otherwise.
  • --feature-[name] β€” enable a compiler feature (see the FEATURES subsection).
  • --no-feature-[name] β€” disable a compiler feature (see the FEATURES subsection).
  • --internal-[flag] β€” enable a compiler internal flag (see the INTERNALS subsection).
  • --no-internal-[flag] β€” disable a compiler internal flag (see the INTERNALS subsection).
  • --codegen-[option] β€” enable an option for the code generator (see the CODEGEN subsection).
  • --no-codegen-[option] β€” disable an option for the code generator (see the CODEGEN subsection).
  • --optimizer-pipeline spec β€” optimizer pipeline specification (see the OPTIMIZER subsection).
  • --precise-bitfield-load-store β€” load and store bitfields at byte boundaries [default: on]. Gives you extra correctness for structures allocated close to a boundary with unmapped memory pages at the expense of less efficient bitfield handling. Does not change bitfield layout.
  • --no-precise-bitfield-load-store β€” load and store bitfields at machine word boundaries [default: off]. ⚠️ may cause failures for structures allocated close to boundaries with unmapped memory pages. Does not change bitfield layout.
  • --declare-atomic-support β€” declare support of atomics (might require explicit linking of a software atomic library such as libatomic or libcompiler_rt).
  • --no-declare-atomic-support β€” declare the absence of atomic support by defining the __STDC_NO_ATOMICS__ macro.
  • --optimize-stack-frame β€” optimize stack frame layout by reusing space for variables with disjoint lifetimes. Might increase compilation time and memory use on very large functions. [default: on].
  • --no-optimize-stack-frame β€” do not optimize stack frame layout, and allocate each variable separately.

πŸŽ€ FEATURES πŸŽ€

these are the supported features β€” use them with the --feature-[feature-name] and --no-feature-[feature-name] flags. heads up: all disabled by default. πŸ™ˆ

  • fail-on-attributes β€” fail if __attribute__((...)) is encountered.
  • missing-function-return-type β€” permit function definitions with a missing return type.
  • designated-init-colons β€” permit the "fieldname:" syntax in designated initializers.
  • labels-as-values β€” permit label-addressing with the && operator.
  • non-strict-qualifiers β€” disable strict qualifier checks for pointers.
  • signed-enums β€” force all enums to have a signed integral type.
  • implicit-function-decl β€” permit implicit function declarations at the use-site.
  • empty-structs β€” permit empty structure/union definitions.
  • ext-pointer-arithmetics β€” permit pointer arithmetics with function and void pointers.
  • missing-braces-subobj β€” permit missing braces for subobject initialization with a scalar.
  • statement-expressions β€” enable statement expressions.
  • omitted-conditional-operand β€” permit omission of the middle ternary expression operand.
  • int-to-pointer β€” permit conversion of any integral type to a pointer.
  • permissive-pointer-conv β€” permit conversions between any pointer types.
  • named-macro-vararg β€” permit named macro variable arguments.
  • include-next β€” permit the include_next preprocessor directive.
  • fail-on-assembly β€” disable support of inline assembly.
  • va-args-comma-concat β€” enable special processing for the ", ##__VA_ARGS" case in the preprocessor.
  • switch-case-ranges β€” enable support for ranges in switch cases.
  • designator-subscript-ranges β€” enable support for ranges in designator subscripts.

🌈 CODEGEN 🌈

these are the supported code generator options β€” used with the --codegen-[option] and --no-codegen-[option] flags:

  • emulated-tls β€” use emulated TLS [disabled by default, enabled on openbsd platform].
  • tls-common β€” generate a common section for thread-local storage if the respective attribute is on [enabled for linux and netbsd].
  • pic β€” generate position-independent code.
  • omit-frame-pointer β€” omit the frame pointer in leaf functions that don't need it.
  • valgrind-compatible-x87 β€” replace x87 opcodes not supported by Valgrind with more expensive alternatives [default: on].
  • syntax=SYNTAX β€” produce assembly output with the specified syntax β€” x86_64-intel_noprefix, x86_64-intel_prefix, x86_64-att (default).
  • details=DETAILS-SPEC β€” augment assembly output with internal code generator details in comments. DETAILS-SPEC can be: vasm (virtual assembly), vasm+regs (virtual assembly and register allocations), devasm (devirtualized assembly).
  • pipeline=PIPELINE-SPEC β€” code generator transformation pipeline specification (not supported for native-* targets), made up of comma separated names of pipeline passes:
    • noop β€” no-operation pass.
    • amd64-drop-virtual β€” non-functional virtual instruction elimination for amd64 targets.
    • amd64-peephole β€” peephole optimizations for amd64 targets.

πŸ”₯ OPTIMIZER πŸ”₯

the optimizer pipeline specification is made up of comma separated names of optimization pipeline passes:

  • noop β€” no-operation pass.
  • phi-propagate β€” wherever possible, substitute phi nodes of the SSA representation by actual references.
  • mem2reg β€” pull function local variables into registers.
  • op-simplify β€” general code simplification.
  • constant-fold β€” folding constant expressions.
  • gvn β€” global value numbering pass to eliminate redundant arithmetic and bitwise operations.
  • local-alloc-sink β€” moving local variable allocations closer to their actual uses (does not affect effective variable lifetimes).
  • dead-code-elimination β€” eliminating dead code, blocks and phi links.
  • block-merge β€” remove unnecessary jump instructions and merge the respective blocks.
  • dead-alloc β€” remove dead local variable allocations.
  • inline-func β€” perform function inlining.
  • tail-calls β€” perform tail call optimization.
  • lowering β€” perform target-specific lowering of the SSA representation. Mandatory for bit-precise integer support.

🎯 TARGET 🎯

supported compilation targets β€” yes, there's one, and it's iconic:

  • amd64-sysv-gas β€” produce optimized GNU As-compatible assembly adhering to the System-V AMD64 ABI [default].

πŸ’€ EXIT STATUS πŸ’€

normally kefir-cc1 exits with exit code 0. 🫢

but if there are any errors in any of the compilation stages, all further compilation is aborted and a non-zero exit code is returned. 😭


⭐ STANDARDS ⭐

kefir-cc1 implements the C17 language standard as specified in its final draft, and the C23 language standard (except _Decimal support) as specified in the first draft of C2Y. periodt. πŸ‘‘

πŸŽ€ NOTES πŸŽ€

okay bestie, housekeeping time β€” the boring-but-actually-important stuff πŸ’…

Licensing tea: the kefir-cc1 compiler is licensed under the terms of the GNU GPLv3 license. periodt. that's the whole vibe. ✨

Who's behind this icon: kefir-cc1 is developed and maintained by Jevgenij Protopopov (legally: Jevgenijs Protopopovs) 🫢 like, put some respect on the name fr fr πŸ‘‘

Found a bug? 😭 please report bugs found in kefir-cc1 to jevgenij@protopopov.lv. do NOT suffer in silence, bestie β€” that's not the move πŸ™ˆ

Where to find it: kefir-cc1 is available online at https://sr.ht/~jprotopopov/kefir/ with read-only mirrors at https://git.protopopov.lv/kefir and https://codeberg.org/jprotopopov/kefir 🌈 go follow the lore iykyk


and that's a wrap on the whole page, bestie πŸŽ€ this cutie comes to you from the Debian fam, dated September 2025, and yes β€” it's literally kefir-cc1(1) πŸ’– slay, go compile something iconic βœ¨πŸ¦‹
πŸ“¦ where this page comes from