|CLANG-LOCAL(1)||General Commands Manual||CLANG-LOCAL(1)|
OpenBSD-specific behavior of LLVM/clang
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) at
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.
-fstrict-aliasingoption is turned off by default unless
-Ofasthas been selected.
clangdoes not store its version string in objects. There is no option to control this.
-pgflag is an alias of
clangdoes not warn for passing pointer arguments or assignment with different signedness outside of
-pedantic. This can be re-enabled with the
-Waddress-of-packed-memberis disabled by default.
-fwrapvoption to treat signed integer overflows as defined is enabled by default to prevent dangerous optimizations which could remove security critical overflow checks.
|September 13, 2017||OpenBSD-6.2|