CLANG-LOCAL(1)
πΈ NAME πΈ
clang-local β the OpenBSD-specific behavior of LLVM/clang, bestie π
. It's from the General Commands Manual, and it's literally all about how clang hits different when it's the system compiler on OpenBSD. π
β¨ DESCRIPTION β¨
Okay so picture this: on OpenBSD, the LLVM/clang compiler has these exact traits, and they're all main-character energy. Vibe check time:
- No
/usr/localhunting β clang does not search under/usr/localfor include files or libraries. As a system compiler, it only searches the system paths by default. No cap. π - Stack protection is on by default β equivalent to the
-fstack-protector-strongoption on other systems. The system will report any violation of the stack protector cookie along with the function name viasyslog(3)atLOG_CRITpriority. π - PIE code by default β clang will generate PIE code by default, allowing the system to load the resulting binary at a random location. This behavior can be turned off by passing
-fno-pieto the compiler and-nopieto the linker. It is also turned off when the-pgflag is used. π -fstrict-aliasingis off by default β unless-Ofasthas been selected. That's the whole vibe. β¨- No version string in objects β clang does not store its version string in objects. There is no option to control this. Literally none. π
-pis an alias of-pgβ that's it, that's the tweet. π- No signedness warnings outside
-pedanticβ clang does not warn for passing pointer arguments or assignment with different signedness outside of-pedantic. This can be re-enabled with the-Wpointer-signflag. π₯ -Waddress-of-packed-memberis disabled by default β yep, that warning option is off unless you turn it on. π- Color diagnostics are disabled by default β color diagnostic messages are disabled by default and can be re-enabled with
-fdiagnostics-color. π -fwrapvis enabled by default β the-fwrapvoption to treat signed integer overflows as defined is enabled by default to prevent dangerous optimizations which could remove security critical overflow checks. This one is security critical, fr fr. π«Ά- Minimal ubsan only β the base system includes the
ubsan_minimalsanitizer runtime but not the fully-featured ubsan runtime. See the documentation for the-fsanitize-minimal-runtimeflag. π§ - Some builtins are disabled β the
malloc(3),calloc(3),realloc(3),strdup(3),strndup(3),valloc(3)andfree(3)builtins are disabled to prevent undesirable optimizations of calls to these functions. Periodt. π - ROP-friendly instruction swap β clang includes a security pass that exchanges some ROP-friendly instructions with safer alternatives on
i386andamd64. This can be disabled with the-fno-fixup-gadgetsoption. π¦ - Return-address clearing β clang includes a security pass that can clear the return address on the stack upon return from calling a function, on
i386andamd64. This can be enabled with the-fret-cleanoption. β - retguard β clang includes the retguard security feature on
amd64,arm64,mips64,powerpcandpowerpc64. This feature can be disabled with the-fno-ret-protectoror-fno-stack-protectoroptions. π -mretpolineonamd64β clang has-mretpolineenabled by default onamd64to protect against branch target injection attacks. It can be disabled with-mno-retpoline. π- New
%nwarning β a new warning for%nformat specifier usage inprintf(3)family functions has been added. Slay. β¨
π¦ SEE ALSO π¦
clang(1)β go read that one too, bestie. π
This page is from Debian, dated June 2, 2024. Bye bestie, mwah π
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 2016 Pascal Stumpf <pascal@stumpf.co>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms