summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/ghc.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 26e22b4840..e3ea52acec 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -664,8 +664,8 @@ $(eval $(call build-package,compiler,stage3,2))
define keepCAFsForGHCiDynOnly
# $1 = stage
# $2 = way
-ifeq "$$(findstring dyn, $1)" ""
-compiler_stage$1_$2_C_OBJS := $$(filter-out %/keepCAFsForGHCi.o,$$(compiler_stage$1_$2_C_OBJS))
+ifeq "$$(findstring dyn, $2)" ""
+compiler_stage$1_$2_C_OBJS := $$(filter-out %/keepCAFsForGHCi.$$($2_osuf),$$(compiler_stage$1_$2_C_OBJS))
endif
endef
$(foreach w,$(compiler_stage1_WAYS),$(eval $(call keepCAFsForGHCiDynOnly,1,$w)))