Add stage-specific AS variables to the build system
authorIan Lynagh <igloo@earth.li>
Fri, 29 Apr 2011 13:37:44 +0000 (14:37 +0100)
committerIan Lynagh <igloo@earth.li>
Fri, 29 Apr 2011 13:37:44 +0000 (14:37 +0100)
mk/config.mk.in
rules/c-suffix-rules.mk
rules/package-config.mk

index f96302b..3d2d6c0 100644 (file)
@@ -548,6 +548,11 @@ CC_STAGE0       = @CC_STAGE0@
 CC_STAGE1       = $(CC)
 CC_STAGE2       = $(CC)
 CC_STAGE3       = $(CC)
+AS              = $(WhatGccIsCalled)
+AS_STAGE0       = @CC_STAGE0@
+AS_STAGE1       = $(AS)
+AS_STAGE2       = $(AS)
+AS_STAGE3       = $(AS)
 
 # C compiler and linker flags from configure (e.g. -m<blah> to select
 # correct C compiler backend). The stage number is the stage of GHC
index bba73a8..a4a0b57 100644 (file)
@@ -49,7 +49,7 @@ $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c
        "$$($1_$2_CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@
 
 $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.$$($3_way_)s
-       "$$(AS)" $$($1_$2_$3_ALL_AS_OPTS) -o $$@ $$<
+       "$$($1_$2_AS)" $$($1_$2_$3_ALL_AS_OPTS) -o $$@ $$<
 
 $1/$2/build/%.$$($3_osuf) : $1/%.S | $$$$(dir $$$$@)/.
        "$$($1_$2_CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@
index 7873157..177ca25 100644 (file)
@@ -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_AS = $$(AS_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)