summaryrefslogtreecommitdiff
path: root/share/man
diff options
context:
space:
mode:
authorPascal Stumpf <pascal@cvs.openbsd.org>2016-09-27 18:13:28 +0000
committerPascal Stumpf <pascal@cvs.openbsd.org>2016-09-27 18:13:28 +0000
commitc8962129b9b16db45e5dd8dd8416fd8aa46b54b6 (patch)
tree3ca9e88977094896d8f7d635277e55335c46a4e3 /share/man
parent87cfd801b3bf52ee9440e216f0eead4fe8683c1c (diff)
Add a clang-local(1) man page, similar to gcc-local(1). This documents
OpenBSD-specific quirks for LLVM/clang. To be expanded as we go along. idea from kettenis@, ok deraadt@
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man1/clang-local.160
1 files changed, 60 insertions, 0 deletions
diff --git a/share/man/man1/clang-local.1 b/share/man/man1/clang-local.1
new file mode 100644
index 00000000000..80ae2095693
--- /dev/null
+++ b/share/man/man1/clang-local.1
@@ -0,0 +1,60 @@
+.\" $OpenBSD: clang-local.1,v 1.1 2016/09/27 18:13:27 pascal Exp $
+.\"
+.\" Copyright (c) 2016 Pascal Stumpf <pascal@stumpf.co>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\"
+.Dd $Mdocdate: September 27 2016 $
+.Dt CLANG-LOCAL 1
+.Os
+.Sh NAME
+.Nm clang-local
+.Nd OpenBSD-specific behavior of LLVM/clang
+.Sh DESCRIPTION
+On
+.Ox ,
+the LLVM/clang compiler exhibits the following characteristics:
+.Bl -dash
+.It
+.Nm clang
+comes with stack protection enabled by default, equivalent to the
+.Fl fstack-protector-strong
+option on other systems.
+The system will report any violation of the stack protector cookie along
+with the function name via
+.Xr syslog 3
+at
+.Dv LOG_CRIT
+priority.
+.It
+.Nm 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
+.Fl fno-pie
+to the compiler and
+.Fl nopie
+to the linker.
+.It
+The
+.Fl fstrict-aliasing
+option is turned off by default.
+.It
+The
+.Fl pg
+flag is an alias of
+.Fl p .
+.El
+.Sh SEE ALSO
+.Xr clang 1