summaryrefslogtreecommitdiff
path: root/sysutils/cpuflags/files/cpuflags.1
blob: 11a13a643aa7cae4c4bffc7a525bf435a2ac6f2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.\"	$NetBSD: cpuflags.1,v 1.1.1.1 2001/05/31 11:29:17 abs Exp $

.Dd May 31, 2001
.Dt CPUFLAGS 1
.Os 
.Sh NAME
.Nm cpuflags
.Nd determine compiler flags to best target current cpu
.Sh SYNOPSIS
.Nm
.Sh DESCRIPTION
.Nm
queries the current cpu type and gcc version, then outputs appropriate
compiler options to best target code for that cpu. If no options exist
to target the current cpu then nothing is output.
.Pp
In the event of the cpu not being recognised, a warning is sent to stderr.
.Pp
.Sh EXAMPLES
.Nm
can be used to set default flags for building entries from pkgsrc and
recompiling the NetBSD kernel or userland by adding the following to
.Pa /etc/mk.conf
.Bd -literal -offset indent
 .if ! defined(CPU_FLAGS) && exists(/usr/pkg/bin/cpuflags)
 CPU_FLAGS!=/usr/pkg/bin/cpuflags
 MAKE_ENV+=CPU_FLAGS=${CPU_FLAGS}
 CFLAGS+=${CPU_FLAGS}
 CXXFLAGS+=${CPU_FLAGS}
 .endif
.Ed
.Sh BUGS
.Nm
does not know about many cpu types yet - updates welcomed to <abs@netbsd.org>
.Pp
Currently
.Nm
is also gcc specific.