Commit 02c76a04 authored by Ian Lynagh's avatar Ian Lynagh

Make and use AR_STAGE[0123] makefile vars

parent ca07d928
......@@ -116,7 +116,7 @@ $(libffi_STAMP_CONFIGURE):
cd build && \
CC=$(CC_STAGE1) \
LD=$(LD) \
AR=$(AR) \
AR=$(AR_STAGE1) \
NM=$(NM) \
CFLAGS="$(SRC_CC_OPTS) $(CONF_CC_OPTS_STAGE1) -w" \
LDFLAGS="$(SRC_LD_OPTS) $(CONF_GCC_LINKER_OPTS_STAGE1) -w" \
......
......@@ -599,6 +599,12 @@ AR = @ArCmd@
AR_OPTS = @ArArgs@
ArSupportsInput = @ArSupportsInput@
ArSupportsAtFile = @ArSupportsAtFile@
AR_STAGE0 = $(AR)
AR_STAGE1 = $(AR)
AR_STAGE2 = $(AR)
AR_STAGE3 = $(AR)
# Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
BASH = /usr/local/bin/bash
......
......@@ -194,7 +194,7 @@ endif
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)" \
echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
$$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@
endif
......@@ -499,7 +499,7 @@ endif
ifneq "$(BINDIST)" "YES"
rts/dist/build/libHSrtsmain.a : rts/dist/build/Main.o
"$(RM)" $(RM_OPTS) $@
"$(AR)" $(AR_OPTS) $(EXTRA_AR_ARGS) $@ $<
"$(AR_STAGE1)" $(AR_OPTS) $(EXTRA_AR_ARGS) $@ $<
endif
# -----------------------------------------------------------------------------
......
......@@ -88,9 +88,9 @@ else
echo $$($1_$2_$3_ALL_OBJS) >> $$@.contents
endif
ifeq "$$(ArSupportsAtFile)" "YES"
"$$(AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@ @$$@.contents
"$$($1_$2_AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@ @$$@.contents
else
"$$(XARGS)" $$(XARGS_OPTS) "$$(AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@ < $$@.contents
"$$(XARGS)" $$(XARGS_OPTS) "$$($1_$2_AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@ < $$@.contents
endif
"$$(RM)" $$(RM_OPTS) $$@.contents
endif
......
......@@ -17,6 +17,7 @@ $(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)
# configuration stuff that depends on which GHC we're building with
ifeq "$3" "0"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment