rts: Don't build StgCRunAsm.S if unregisterised
authorBen Gamari <bgamari.foss@gmail.com>
Thu, 11 May 2017 19:41:38 +0000 (15:41 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 11 May 2017 21:33:11 +0000 (17:33 -0400)
StgCRunAsm.S provides StgCRun on powerpc64le platforms when
registerised.  However, in the unregisterised setting we use the
mini-interpreter and consequently shouldn't build StgCRunAsm.S lest we
get duplicate symbols.

Test Plan: Build unregisterised compiler on AIX.

Reviewers: hvr, trommler, austin, simonmar

Reviewed By: trommler, simonmar

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3560

rts/ghc.mk

index d089859..990f4db 100644 (file)
@@ -55,9 +55,12 @@ rts_S_SRCS += rts/AdjustorAsm.S
 endif
 # this matches substrings of powerpc64le, including "powerpc" and "powerpc64"
 ifneq "$(findstring $(TargetArch_CPP), powerpc64le)" ""
+# unregisterised builds use the mini interpreter
+ifneq "$(GhcUnregisterised)" "YES"
 rts_S_SRCS += rts/StgCRunAsm.S
 endif
 endif
+endif
 
 ifeq "$(GhcUnregisterised)" "YES"
 GENAPPLY_OPTS = -u