From 284647dd59e9b036f51950ce24332847a3f932b4 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Mon, 15 Jun 2009 21:47:58 +0000 Subject: [PATCH] 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. --- rules/build-package-data.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 1.7.10.4