File tree Expand file tree Collapse file tree 3 files changed +141
-111
lines changed Expand file tree Collapse file tree 3 files changed +141
-111
lines changed Original file line number Diff line number Diff line change @@ -306,17 +306,16 @@ The following environment variables (not a definitive list) impact configure's
306306behavior:
307307
308308CFLAGS="?"
309- Pass these flags to the compiler. You probably shouldn't define this unless
310- you know what you are doing. (Use EXTRA_CFLAGS instead.)
309+ Pass these flags to the C compiler. Any flags set by the configure script
310+ are prepended, which means explicitly set flags generally take precedence.
311+ Take care when specifying flags such as -Werror, because configure tests may
312+ be affected in undesirable ways.
311313
312314EXTRA_CFLAGS="?"
313- Append these flags to CFLAGS. This makes it possible to add flags such as
314- -Werror, while allowing the configure script to determine what other flags
315- are appropriate for the specified configuration.
316-
317- The configure script specifically checks whether an optimization flag (-O*)
318- is specified in EXTRA_CFLAGS, and refrains from specifying an optimization
319- level if it finds that one has already been specified.
315+ Append these flags to CFLAGS, without passing them to the compiler during
316+ configuration. This makes it possible to add flags such as -Werror, while
317+ allowing the configure script to determine what other flags are appropriate
318+ for the specified configuration.
320319
321320CPPFLAGS="?"
322321 Pass these flags to the C preprocessor. Note that CFLAGS is not passed to
Original file line number Diff line number Diff line change @@ -24,8 +24,10 @@ abs_objroot := @abs_objroot@
2424
2525# Build parameters.
2626CPPFLAGS := @CPPFLAGS@ -I$(srcroot ) include -I$(objroot ) include
27+ CONFIGURE_CFLAGS := @CONFIGURE_CFLAGS@
28+ SPECIFIED_CFLAGS := @SPECIFIED_CFLAGS@
2729EXTRA_CFLAGS := @EXTRA_CFLAGS@
28- CFLAGS := @CFLAGS@ $(EXTRA_CFLAGS )
30+ CFLAGS := $( strip $(CONFIGURE_CFLAGS ) $( SPECIFIED_CFLAGS ) $( EXTRA_CFLAGS ) )
2931LDFLAGS := @LDFLAGS@
3032EXTRA_LDFLAGS := @EXTRA_LDFLAGS@
3133LIBS := @LIBS@
You can’t perform that action at this time.
0 commit comments