Fix the build for non-GNU-ar
[ghc-hetmet.git] / rules / build-package-way.mk
index 735527c..d66ed7c 100644 (file)
@@ -81,7 +81,11 @@ ifeq "$$($1_$2_SplitObjs)" "YES"
 else
        echo $$($1_$2_$3_ALL_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` >> $$@.contents
 endif
+ifeq "$$(ArIsGNUAr)" "YES"
        "$$(AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@ @$$@.contents
+else
+       "$$(XARGS)" $$(XARGS_OPTS) "$$(AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@ < $$@.contents
+endif
        "$$(RM)" $$(RM_OPTS) $$@.contents
 endif