From: Ian Lynagh Date: Mon, 15 Jun 2009 21:47:58 +0000 (+0000) Subject: Make sure we aren't passing -Werror in the CFLAGS for configure scripts X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=284647dd59e9b036f51950ce24332847a3f932b4 Make sure we aren't passing -Werror in the CFLAGS for configure scripts When configure tests for a feature it may not generate warning-free C code, and thus may think that the feature doesn't exist if -Werror is on. --- diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk index 79591df..1e2311f 100644 --- a/rules/build-package-data.mk +++ b/rules/build-package-data.mk @@ -20,7 +20,10 @@ ifeq "$(HSCOLOUR_SRCS)" "YES" $1_$2_CONFIGURE_OPTS += --with-hscolour="$$(HSCOLOUR)" endif -$1_$2_CONFIGURE_OPTS += --configure-option=CFLAGS="$$(SRC_CC_OPTS) $$($1_CC_OPTS) $$($1_$2_CC_OPTS)" +# We filter out -Werror from SRC_CC_OPTS, because when configure tests +# for a feature it may not generate warning-free C code, and thus may +# think that the feature doesn't exist if -Werror is on. +$1_$2_CONFIGURE_OPTS += --configure-option=CFLAGS="$$(filter-out -Werror,$$(SRC_CC_OPTS)) $$($1_CC_OPTS) $$($1_$2_CC_OPTS)" $1_$2_CONFIGURE_OPTS += --configure-option=LDFLAGS="$$(SRC_LD_OPTS) $$($1_LD_OPTS) $$($1_$2_LD_OPTS)" # This rule configures the package, generates the package-data.mk file