summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-01 00:20:10 +0100
committerwm4 <wm4@nowhere>2014-11-01 00:28:19 +0100
commitb66669ef2cb433d4514175e2b97f926cfdc8bcc6 (patch)
tree38d31edc0d3abe07265cf8011cf4cbb75bc7f7ad /wscript
parent650b57cd6e31c6881b78d5a311fc014552cf3ba0 (diff)
downloadmpv-b66669ef2cb433d4514175e2b97f926cfdc8bcc6.tar.bz2
mpv-b66669ef2cb433d4514175e2b97f926cfdc8bcc6.tar.xz
build: fix 'ar' invocation when cross-compiling
This shouldn't use the host's 'ar' when building static libs. It only worked until now because Linux 'ar' is usually built with PE support. Couldn't confirm whether it works, because this dumb crap is just broken when cross-compiling to mingw.
Diffstat (limited to 'wscript')
-rw-r--r--wscript4
1 files changed, 3 insertions, 1 deletions
diff --git a/wscript b/wscript
index c8b8754562..ece79db68d 100644
--- a/wscript
+++ b/wscript
@@ -833,15 +833,17 @@ def configure(ctx):
ctx.resetenv(ctx.options.variant)
ctx.check_waf_version(mini='1.8.1')
target = os.environ.get('TARGET')
- (cc, pkg_config, windres) = ('cc', 'pkg-config', 'windres')
+ (cc, pkg_config, ar, windres) = ('cc', 'pkg-config', 'ar', 'windres')
if target:
cc = '-'.join([target, 'gcc'])
pkg_config = '-'.join([target, pkg_config])
+ ar = '-'.join([target, ar])
windres = '-'.join([target, windres])
ctx.find_program(cc, var='CC')
ctx.find_program(pkg_config, var='PKG_CONFIG')
+ ctx.find_program(ar, var='AR')
ctx.find_program('perl', var='BIN_PERL')
ctx.find_program('rst2man', var='RST2MAN', mandatory=False)
ctx.find_program('rst2pdf', var='RST2PDF', mandatory=False)