X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fbuild-package-data.mk;h=1e2311fbd7fbe2baf3bb5432863c8c18620957ad;hb=0bde11509ca13d4d0914496ee652d7c2b43a0420;hp=3a4db89170bed5f93eb64aec51b49bcaed6bc17e;hpb=0ef6ba7b28187a4bf5309f9702eeaf53a281204b;p=ghc-hetmet.git diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk index 3a4db89..1e2311f 100644 --- a/rules/build-package-data.mk +++ b/rules/build-package-data.mk @@ -20,6 +20,12 @@ ifeq "$(HSCOLOUR_SRCS)" "YES" $1_$2_CONFIGURE_OPTS += --with-hscolour="$$(HSCOLOUR)" endif +# 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 # for our build system, and registers the package for use in-place in # the build tree.