summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules/distdir-way-opts.mk1
-rw-r--r--utils/ghc-cabal/ghc.mk1
2 files changed, 2 insertions, 0 deletions
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index d604fcf621..a0dba3a1fe 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -120,6 +120,7 @@ $1_$2_$3_MOST_HC_OPTS = \
$$(if $$($1_$2_PROG),, \
$$(if $$($1_PACKAGE),$$($4_THIS_UNIT_ID) $$($1_$2_COMPONENT_ID))) \
$$(if $$($1_PACKAGE),-hide-all-packages) \
+ -package-env - \
-i $$(if $$($1_$2_HS_SRC_DIRS),$$(foreach dir,$$($1_$2_HS_SRC_DIRS),-i$1/$$(dir)),-i$1) \
-i$1/$2/build \
-I$1/$2/build \
diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk
index 145fc8fca5..e9647a2af1 100644
--- a/utils/ghc-cabal/ghc.mk
+++ b/utils/ghc-cabal/ghc.mk
@@ -61,6 +61,7 @@ $(ghc-cabal_DIST_BINARY): $(CABAL_LEXER_DEP) utils/ghc-cabal/Main.hs $(TOUCH_DEP
$(addprefix -optl, $(SRC_LD_OPTS) $(CONF_GCC_LINKER_OPTS_STAGE0)) \
-O0 \
-hide-all-packages \
+ -package-env - \
$(addprefix -package , $(CABAL_BUILD_DEPS)) \
--make utils/ghc-cabal/Main.hs -o $@ \
-no-user-package-db \