NAME
clang-local —
OpenBSD-specific behavior of
LLVM/clang
DESCRIPTION
On OpenBSD, the LLVM/clang compiler exhibits the following characteristics:
clangcomes with stack protection enabled 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 via syslog(3) atLOG_CRITpriority.clangwill 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.- The
-fstrict-aliasingoption is turned off by default unless-Ofasthas been selected. - The
-pgflag is an alias of-p. clangdoes not warn for passing pointer arguments or assignment with different signedness outside of-pedantic. This can be re-enabled with the-Wpointer-signflag.- Color diagnostic messages are disabled by default and can be re-enabled
with
-fdiagnostics-color.