summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/config.mk.in12
-rw-r--r--rts/ghc.mk4
-rw-r--r--rules/build-package-way.mk6
-rw-r--r--rules/package-config.mk3
4 files changed, 20 insertions, 5 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in
index f0a142f24e..01019b825f 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -603,6 +603,18 @@ AR_STAGE0 = $(AR)
AR_STAGE1 = $(AR)
AR_STAGE2 = $(AR)
AR_STAGE3 = $(AR)
+AR_OPTS_STAGE0 = $(AR_OPTS)
+AR_OPTS_STAGE1 = $(AR_OPTS)
+AR_OPTS_STAGE2 = $(AR_OPTS)
+AR_OPTS_STAGE3 = $(AR_OPTS)
+EXTRA_AR_ARGS_STAGE0 = $(EXTRA_AR_ARGS)
+EXTRA_AR_ARGS_STAGE1 = $(EXTRA_AR_ARGS)
+EXTRA_AR_ARGS_STAGE2 = $(EXTRA_AR_ARGS)
+EXTRA_AR_ARGS_STAGE3 = $(EXTRA_AR_ARGS)
+ArSupportsAtFile_STAGE0 = $(ArSupportsAtFile)
+ArSupportsAtFile_STAGE1 = $(ArSupportsAtFile)
+ArSupportsAtFile_STAGE2 = $(ArSupportsAtFile)
+ArSupportsAtFile_STAGE3 = $(ArSupportsAtFile)
CONTEXT_DIFF = @ContextDiffCmd@
CP = cp
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 8925ff9179..a2369452b7 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -195,7 +195,7 @@ else
$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS)
"$$(RM)" $$(RM_OPTS) $$@
echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
- $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@
+ $$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
endif
endif
@@ -499,7 +499,7 @@ endif
ifneq "$(BINDIST)" "YES"
rts/dist/build/libHSrtsmain.a : rts/dist/build/Main.o
"$(RM)" $(RM_OPTS) $@
- "$(AR_STAGE1)" $(AR_OPTS) $(EXTRA_AR_ARGS) $@ $<
+ "$(AR_STAGE1)" $(AR_OPTS_STAGE1) $(EXTRA_AR_ARGS_STAGE1) $@ $<
endif
# -----------------------------------------------------------------------------
diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk
index 9f69536b5e..a7dc9182a0 100644
--- a/rules/build-package-way.mk
+++ b/rules/build-package-way.mk
@@ -87,10 +87,10 @@ ifeq "$$($1_$2_SplitObjs)" "YES"
else
echo $$($1_$2_$3_ALL_OBJS) >> $$@.contents
endif
-ifeq "$$(ArSupportsAtFile)" "YES"
- "$$($1_$2_AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@ @$$@.contents
+ifeq "$$($1_$2_ArSupportsAtFile)" "YES"
+ "$$($1_$2_AR)" $$($1_$2_AR_OPTS) $$($1_$2_EXTRA_AR_ARGS) $$@ @$$@.contents
else
- "$$(XARGS)" $$(XARGS_OPTS) "$$($1_$2_AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@ < $$@.contents
+ "$$(XARGS)" $$(XARGS_OPTS) "$$($1_$2_AR)" $$($1_$2_AR_OPTS) $$($1_$2_EXTRA_AR_ARGS) $$@ < $$@.contents
endif
"$$(RM)" $$(RM_OPTS) $$@.contents
endif
diff --git a/rules/package-config.mk b/rules/package-config.mk
index dcfc26e47a..7873157363 100644
--- a/rules/package-config.mk
+++ b/rules/package-config.mk
@@ -18,6 +18,9 @@ $(call profStart, package-config($1,$2,$3))
$1_$2_HC = $$(GHC_STAGE$3)
$1_$2_CC = $$(CC_STAGE$3)
$1_$2_AR = $$(AR_STAGE$3)
+$1_$2_AR_OPTS = $$(AR_OPTS_STAGE$3)
+$1_$2_EXTRA_AR_ARGS = $$(EXTRA_AR_ARGS_STAGE$3)
+$1_$2_ArSupportsAtFile = $$(ArSupportsAtFile_STAGE$3)
# configuration stuff that depends on which GHC we're building with
ifeq "$3" "0"