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

Gaetan Nadon memsize at videotron.ca
Sun Apr 6 16:31:28 PDT 2014


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.

This explains the role and the order of variables:

http://www.gnu.org/software/automake/manual/automake.html#Flag-Variables-Ordering



More information about the xorg-devel mailing list