[PATCH xfs] Fix CFLAGS and LDFLAGS for Cygwin/MinGW

Yaakov (Cygwin/X) yselkowitz at users.sourceforge.net
Sun Apr 6 16:50:50 PDT 2014


On 2014-04-06 18:31, Gaetan Nadon wrote:
> On 14-04-06 03:45 PM, Yaakov (Cygwin/X) wrote:
>> +case "$host_os" in
>> +  cygwin*|mingw*)
>> +    CFLAGS="$CFLAGS -DFD_SETSIZE=256"
>> +    LDFLAGS="$LDFLAGS -Wl,--export-all" ;;
>> +esac
> We are not supposed to clobber user variables like CFLAGS. I didn't look
> at the particular cygwin environment, maybe it is already hopelessly
> clobbered, or there is no other way, but if not, it would be better not
> to start.
>
> The only time we have to do it is during a configuration test where we
> use save_CFLAGS="$CFLAGS" and then restore it after the test. The goal
> is to allow the user to easily override the compiler flags established
> in the makefile, as the user has the final say in all this.

You're referring to using CFLAGS instead of AM_CFLAGS in automake files. 
  This is appending to (not clobbering) CFLAGS at the configure level, 
which still allows the user to override the settings during make (even 
though it would be a bad idea if they left out these flags).


Yaakov
Cygwin/X



More information about the xorg-devel mailing list