From b66669ef2cb433d4514175e2b97f926cfdc8bcc6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 1 Nov 2014 00:20:10 +0100 Subject: 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. --- wscript | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wscript') 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) -- cgit v1.2.3