summaryrefslogtreecommitdiff
blob: 967ee9c9cf961edf3d2d4c7ffba39905bc7bd230 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.TH "FLAG-O-MATIC.ECLASS" "5" "Jun 2003" "Portage 2.0.51" "portage"
.SH "NAME"
flag\-o\-matic.eclass \- manipulate CFLAGS/CXXFLAGS easily and reliably
.SH "DESCRIPTION"
The \fBflag\-o\-matic\fR eclass contains a suite of functions to
manipulate the CFLAGS/CXXFLAGS variables.
.SH "FUNCTIONS"
.TP
.BR "append-flags " "\fI<flags>\fR"
Add extra \fIflags\fR to the current CFLAGS/CXXFLAGS.
.TP
.BR "filter-flags " "\fI<flags>\fR"
Remove particular \fIflags\fR from CFLAGS/CXXFLAGS.  This function 
will only match complete flags.
.TP
.BR "replace-flags " "\fI<orig-flag>\fR \fI<new-flag>\fR"
Replace all occurences of \fIoriginal flag\fR with \fInew flag\fR.
.TP
.BR "replace-cpu-flags " "\fI<old cpus>\fR \fI<new cpu>\fR"
Replace all -march, -mcpu, and -mtune flags which contain \fIold cpus\fR 
with -march, -mcpu, and -mtune flags which contain \fInew cpu\fR.
.TP
.BR "get-flag " "\fI<flag>\fR"
If \fIflag\fR is prefixed with -, then the whole flag will 
be echoed.  If just the flag name is specified, and the flag has 
a setting, the value for the flag will be echoed instead.

.I Examples:
.br
CFLAGS="-march=i586 -ffast-math"
.br
`get-flag -march`      == "-march=i586"
.br
`get-flag march`       == "i586"
.br
`get-flag -ffast-math` == "-ffast-math"
.br
`get-flag ffast-math`  == "-ffast-math"
.TP
.BR "is-flag " "\fI<flag>\fR"
Returns true if \fIflag\fR is in CFLAGS or CXXFLAGS.
.TP
.BR "filter-mfpmath " "\fI<math types>\fR"
Remove specified \fImath types\fR from the selected fpmath units.  
If the user has -mfpmath=sse,386, running `filter-mfpmath sse`
will leave the user with -mfpmath=386.
.TP
.BR "append-ldflags " "\fI<flags>\fR"
Add extra \fIflags\fR to the current LDFLAGS.
.TP
.BR "filter-ldflags " "\fI<flags>\fR"
Remove particular \fIflags\fR from LDFLAGS.  This function
will only match complete flags.
.TP
.BR "filter-lfs-flags"
Remove flags that enable Large File Support.
.TP
.BR "append-lfs-flags"
Add flags that enable Large File Support.
.TP
.BR "strip-flags"
Strip CFLAGS/CXXFLAGS of everything except for flags known to 
be good flags, or are flags that affect the ABI.  Users of stable 
profile are limited to these flags:
.br
.I "-O -O1 -O2 -mcpu -march -mtune -fstack-protector -pipe -g"
.br
Users of unstable profile are allowed the above flags and these flags:
.br
.I "-Os -O3 -freorder-blocks -fprefetch-loop-arrays"
.TP
.BR "test_flag " "\fI<flag>\fR"
Tests to see if \fIflag\fR is supported by the active toolchain.
.SH "REPORTING BUGS"
Please report bugs via http://bugs.gentoo.org/
.SH "SEE ALSO"
.BR ebuild (5),
.BR make.conf (5)
.SH "FILES"
.BR /usr/portage/eclass/flag\-o\-matic.eclass
.SH "AUTHORS"
Mike Frysinger <vapier@gentoo.org>
.SH "CVS HEADER"
$Header: /var/cvsroot/gentoo-src/portage/man/flag-o-matic.eclass.5,v 1.5.2.2 2005/01/15 00:19:36 vapier Exp $