xref: /openbsd-src/share/man/man1/clang-local.1 (revision 6a13ef69787db04ae501a22e92fa10865b44fd7c)
1.\" $OpenBSD: clang-local.1,v 1.2 2016/09/27 19:33:57 pascal Exp $
2.\"
3.\" Copyright (c) 2016 Pascal Stumpf <pascal@stumpf.co>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.\"
18.Dd $Mdocdate: September 27 2016 $
19.Dt CLANG-LOCAL 1
20.Os
21.Sh NAME
22.Nm clang-local
23.Nd OpenBSD-specific behavior of LLVM/clang
24.Sh DESCRIPTION
25On
26.Ox ,
27the LLVM/clang compiler exhibits the following characteristics:
28.Bl -dash
29.It
30.Nm clang
31comes with stack protection enabled by default, equivalent to the
32.Fl fstack-protector-strong
33option on other systems.
34The system will report any violation of the stack protector cookie along
35with the function name via
36.Xr syslog 3
37at
38.Dv LOG_CRIT
39priority.
40.It
41.Nm clang
42will generate PIE code by default, allowing the system to load the resulting
43binary at a random location.
44This behavior can be turned off by passing
45.Fl fno-pie
46to the compiler and
47.Fl nopie
48to the linker.
49.It
50The
51.Fl fstrict-aliasing
52option is turned off by default unless
53.Fl Ofast
54has been selected.
55.It
56The
57.Fl pg
58flag is an alias of
59.Fl p .
60.El
61.Sh SEE ALSO
62.Xr clang 1
63