The checks
Each check links to its flag in the OpenSSF Compiler Options Hardening Guide for C and C++, as chard's inventory of the guide reads it (guide revision 2026-08-20, anchors as of 2026-11-24); to the guide's page where the guide gives the flag no anchor; and to its toolchain's manual where the guide does not list the flag. The links are citations; the guide's authors reviewed nothing here. The flag after each check is chard's.
- 🥬 a check the count takes: 28 on every architecture, and the CET pair on x86_64 and i386 or the branch-protection pair on aarch64
- gray leaf: a check of the guide's TL;DR the count leaves out
- †the protected state is off: on is the weakness
- ‡ enforced at run time by the kernel and the CPU: read in a virtual machine or on the machine itself, not in a container
bounds
fortify-enforced-dynamic🥬:-D_FORTIFY_SOURCE=3fortify-enforced-known🥬:-D_FORTIFY_SOURCE (enforced); the guide's:-D_FORTIFY_SOURCE=3fortify-level-ge-2-subobject🥬:-D_FORTIFY_SOURCE>=2 (subobject bounds); the guide's:-D_FORTIFY_SOURCE=3fortify-effective🥬:_FORTIFY_SOURCE (level in force); the guide's:-D_FORTIFY_SOURCE=3fortify-requested🥬:-D_FORTIFY_SOURCE; the guide's:-D_FORTIFY_SOURCE=3strict-flex-arrays-enforced🥬:-fstrict-flex-arrays (enforced under _FORTIFY_SOURCE>=2); the guide's:-fstrict-flex-arrays=3strict-flex-arrays🥬:-fstrict-flex-arrays; the guide's:-fstrict-flex-arrays=3fortify-level-ge-2-percent-n🥬:-D_FORTIFY_SOURCE>=2 (%n in a writable segment); the guide's:-D_FORTIFY_SOURCE=3fortify-printf-flag🥬:_FORTIFY_SOURCE (printf's flag argument); the guide's:-D_FORTIFY_SOURCE=3optimization-enabledgray leaf:-O2optimization-appliedgray leaf:-O2 (code generation)
initialization
auto-var-init-active🥬:-ftrivial-auto-var-initauto-var-init-pattern:-ftrivial-auto-var-init=pattern; the guide's:-ftrivial-auto-var-initzero-init-padding-bits:-fzero-init-padding-bits=all
undefined behaviour
no-strict-overflow🥬:-fno-strict-overflowtrapv-trapped:-ftrapvtrapv-helper-called:-ftrapv (libgcc helper); the guide's:-ftrapvubsan-trap-mode:-fsanitize-trap=undefinedno-delete-null-pointer-checks🥬:-fno-delete-null-pointer-checksno-strict-aliasing🥬:-fno-strict-aliasing
stack
canary-emitted🥬:-fstack-protector-strong (emitted); the guide's:-fstack-protector-strongssp-level🥬:-fstack-protector-strongssp-level-emitted🥬:-fstack-protector-strong (level emitted); the guide's:-fstack-protector-strongssp-covers-small-arrays:--param ssp-buffer-sizestack-clash-guard-page🥬:-fstack-clash-protectionnoexecstack🥬:-Wl,-z,noexecstacknoexecstack-enforced‡ gray leaf:non-executable stack at runtime; the guide's:-Wl,-z,noexecstacklinker-default-noexecstack:--enable-default-execstack=no (linker default); the guide's:--disable-default-execstackret-protector-emitted(OpenBSD's clang-local(1)):-fret-protectorexceptions-macro:-fexceptionsexcept-table-emitted:-fexceptions (emitted); the guide's:-fexceptions
control flow
shadow-stack-enforced‡:-fcf-protection=full (shadow stack enforced); the guide's:-fcf-protection=fullcet-endbr-emitted:-fcf-protection=branch (landing pads compiled in); the guide's:-fcf-protection=fullcet-marked🥬:-fcf-protection=full (artifact markings); the guide's:-fcf-protection=fullcet-marked-object:-fcf-protection=full (compiler marking, before linking); the guide's:-fcf-protection=fullcet-macro🥬:-fcf-protection=fullbti-enforced‡:-mbranch-protection=bti (BTI enforced); the guide's:-mbranch-protection=standardpac-ret-enforced‡:-mbranch-protection=pac-ret (return address authenticated); the guide's:-mbranch-protection=standardbranch-protection-marked🥬:-mbranch-protection=standard (artifact markings); the guide's:-mbranch-protection=standardbranch-protection-macro🥬:-mbranch-protection=standardgcs-marked(the GCC manual):-mbranch-protection=gcs (artifact markings)gcs-macro(the GCC manual):-mbranch-protection=gcszero-call-used-regs:-fzero-call-used-regs; the guide's:-fzero-call-used-regs=used-gpr
memory permissions
relro🥬:-Wl,-z,relro -Wl,-z,now; the guide's:-Wl,-z,relrorelro-no-piegray leaf:-Wl,-z,relro -Wl,-z,now (-no-pie executable); the guide's:-Wl,-z,relroplt-bypassed(the GCC manual):-fno-pltrwx-segment-absent†:-Wl,-N; the guide's:--enable-warn-rwx-segmentsseparate-code(the GNU ld manual):-Wl,-z,separate-codetextrel-absent†:-fPIC (no text relocations); the guide's:-fPIC -shared
position independence
pie🥬:-pie; the guide's:-fPIE -piepie-macro🥬:-fPIE; the guide's:-fPIE -piepic-macro:-fPIC; the guide's:-fPIC -sharedpic-object-relocs:-fPIC (object relocations); the guide's:-fPIC -sharedrelative-relocs(the GNU ld manual):-Wl,-z,pack-relative-relocs
link
nodlopen🥬:-Wl,-z,nodlopenrpath-absent†:-Wl,-rpath; the guide's:-Wl,-rpath,as-needed🥬:-Wl,--as-neededno-copy-dt-needed🥬:-Wl,--no-copy-dt-needed-entries
c++
cxx-stdlib-assertions🥬:-D_GLIBCXX_ASSERTIONScxx-assertions-symbol🥬:-D_GLIBCXX_ASSERTIONS (artifact symbol); the guide's:-D_GLIBCXX_ASSERTIONScxx-hardening-requested🥬:-D_GLIBCXX_ASSERTIONS / -D_LIBCPP_HARDENING_MODE; the guide's:-D_GLIBCXX_ASSERTIONS
warnings
format-security-is-errorgray leaf:-Werror=format-securityformat-nonliteral-warnedgray leaf:-Wformat=2format-mismatch-warnedgray leaf:-Wformatuse-after-free-warned(the GCC manual):-Wuse-after-freemismatched-dealloc-warned(the GCC manual):-Wmismatched-dealloctrampolines-warned:-Wtrampolinesbidi-chars-any:-Wbidi-chars=anyimplicit-fallthrough-warnedgray leaf:-Wimplicit-fallthroughconversion-warns-on-narrowinggray leaf:-Wconversionsign-conversion-warns-on-signedness-change:-Wsign-conversionhardened-downgrade-warned:-Whardenedwarn-allgray leaf:-Wallwarn-extra:-Wextra
obsolete c
implicit-function-declaration-is-error:-Werror=implicit-function-declaration; the guide's:-Werror=implicitimplicit-int-is-error:-Werror=implicit-int; the guide's:-Werror=implicitincompatible-pointer-types-is-error:-Werror=incompatible-pointer-typesint-conversion-is-error:-Werror=int-conversion