Commit 1f725a82 authored by Simon Marlow's avatar Simon Marlow

Get the value of $(AR) from ghc --info

On Windows, 'ar' might not necessarily be on $PATH.
parent ce7325ce
......@@ -138,6 +138,11 @@ endif
$(eval $(call get-ghc-field,GhcRTSWays,RTS ways))
$(eval $(call get-ghc-field,AR,ar command))
ifeq "$(AR)" ""
AR = ar
TOP_ABS := $(abspath $(TOP))
$(eval $(call canonicalise,TOP_ABS))
......@@ -12,7 +12,7 @@ ghcilink001 :
$(RM) -rf dir001
mkdir dir001
"$(TEST_HC)" -c f.c -o dir001/foo.o
ar cqs dir001/libfoo.a dir001/foo.o
$(AR) cqs dir001/libfoo.a dir001/foo.o
echo "test" | "$(TEST_HC)" --interactive -ignore-dot-ghci -v0 -Ldir001 -lfoo TestLink.hs
# Test 2: ghci -Ldir -lfoo
......@@ -66,7 +66,7 @@ ghcilink004 :
'$(GHC_PKG)' --no-user-package-conf -f $(LOCAL_PKGCONF004) register $(PKG004) -v0
"$(TEST_HC)" -c f.c -o dir004/foo.o
ar cqs dir004/libfoo.a dir004/foo.o
$(AR) cqs dir004/libfoo.a dir004/foo.o
echo "test" | "$(TEST_HC)" --interactive -ignore-dot-ghci -v0 -package-conf $(LOCAL_PKGCONF004) -package test TestLink.hs
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