55:'s ./configure script will usually pick them up from the environment and write them into the generated Makefiles. Some package install scripts, like SDL, allow CFLAGS settings to override their normal settings (instead of append to them), so setting CFLAGS can cause harm in this case.
50:
These variables are usually set inside a
Makefile and are then appended to the command line when the compiler is invoked. If they are not specified in the Makefile, then they will be read from the environment, if present. Tools like
211:
93:
206:
62:
109:
125:
32:
24:
40:
176:
216:
78:
200:
157:
191:
97:
52:
36:
28:
86:
186:
70:
181:
156:
Stallman, Richard M.; McGrath, Roland; Smith, Paul D. (2020) .
144:
92:These variables are most commonly used to specify
31:variables that can be set to specify additional
159:GNU Make. A Program for Directing Recompilation
8:
192:Linux Review page on optimized gcc compiling
77:exists with switches to be passed to the
61:enables the addition of switches for the
137:
100:switches to a compiler, as for example
85:enables the addition of switches for a
7:
69:is meant to be used when invoking a
145:Stallman, McGrath & Smith 2020
14:
73:compiler. Similarly, a variable
187:Gentoo Wiki guide to safe CFLAGS
1:
165:. Free Software Foundation.
39:in the process of building
233:
47:fulfills a similar role.
212:C (programming language)
182:Gentoo Wiki CFLAG guide
23:are either the name of
177:GNU optimization page
126:Compiler optimization
79:C or C++ preprocessor
25:environment variables
35:to be passed to a
41:computer software
224:
207:Build automation
166:
164:
148:
142:
115:
107:
103:
65:compiler, while
232:
231:
227:
226:
225:
223:
222:
221:
197:
196:
173:
168:
162:
155:
152:
151:
143:
139:
134:
122:
113:
105:
101:
12:
11:
5:
230:
228:
220:
219:
214:
209:
199:
198:
195:
194:
189:
184:
179:
172:
171:External links
169:
153:
150:
149:
136:
135:
133:
130:
129:
128:
121:
118:
13:
10:
9:
6:
4:
3:
2:
229:
218:
215:
213:
210:
208:
205:
204:
202:
193:
190:
188:
185:
183:
180:
178:
175:
174:
170:
167:
161:
160:
146:
141:
138:
131:
127:
124:
123:
119:
117:
114:-march=athlon
111:
99:
95:
90:
88:
84:
81:. Similarly,
80:
76:
72:
68:
64:
60:
56:
54:
48:
46:
42:
38:
34:
30:
26:
22:
18:
158:
154:
140:
94:optimization
91:
82:
74:
66:
58:
57:
49:
44:
20:
16:
15:
147:, sec.10.3.
112:-specific)
89:compiler.
201:Categories
132:References
98:debugging
120:See also
75:CPPFLAGS
67:CXXFLAGS
53:autoconf
37:compiler
33:switches
29:Makefile
21:CXXFLAGS
87:Fortran
83:FFLAGS
59:CFLAGS
45:FFLAGS
27:or of
17:CFLAGS
163:(PDF)
108:or (
19:and
217:C++
110:GCC
106:-O2
96:or
71:C++
203::
116:.
104:,
102:-g
43:.
63:C
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.