.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\fR" Add extra \fIflags\fR to the current CFLAGS/CXXFLAGS. .TP .BR "filter-flags " "\fI\fR" Remove particular \fIflags\fR from CFLAGS/CXXFLAGS. This function will only match complete flags. .TP .BR "replace-flags " "\fI\fR \fI\fR" Replace all occurences of \fIoriginal flag\fR with \fInew flag\fR. .TP .BR "replace-cpu-flags " "\fI\fR \fI\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\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\fR" Returns true if \fIflag\fR is in CFLAGS or CXXFLAGS. .TP .BR "filter-mfpmath " "\fI\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\fR" Add extra \fIflags\fR to the current LDFLAGS. .TP .BR "filter-ldflags " "\fI\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\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 .SH "CVS HEADER" $Id: /var/cvsroot/gentoo-src/portage/man/flag-o-matic.eclass.5,v 1.5.2.2 2005/01/15 00:19:36 vapier Exp $