From 9f81aeb5dadab588920b157a4610e890995ef4b9 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Tue, 7 Nov 2017 17:10:46 -0800 Subject: Makefile: Capstone: Add support for cross compile ranlib When cross compiling QEMU for Windows we need to specify the cross version of ranlib to avoid build errors when building capstone. This patch ensures we use the same cross prefix on ranlib as other toolchain components. - Fedora23 mingw - RHEL-7.2 with mingw packages from epel: LINK qemu-img.exe build-win64/capstone/capstone.lib: error adding symbols: Archive has no index; run ranlib to add one collect2: error: ld returned 1 exit status $ x86_64-w64-mingw32-ar --version GNU ar (GNU Binutils) 2.25 Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrange Suggested-by: Peter Maydell Message-Id: Signed-off-by: Alistair Francis Signed-off-by: Richard Henderson --- configure | 3 +++ 1 file changed, 3 insertions(+) (limited to 'configure') diff --git a/configure b/configure index a6055c0710..0e856bbc04 100755 --- a/configure +++ b/configure @@ -482,6 +482,7 @@ ccas="${CCAS-$cc}" cpp="${CPP-$cc -E}" objcopy="${OBJCOPY-${cross_prefix}objcopy}" ld="${LD-${cross_prefix}ld}" +ranlib="${RANLIB-${cross_prefix}ranlib}" nm="${NM-${cross_prefix}nm}" strip="${STRIP-${cross_prefix}strip}" windres="${WINDRES-${cross_prefix}windres}" @@ -6288,6 +6289,7 @@ echo "CCAS=$ccas" >> $config_host_mak echo "CPP=$cpp" >> $config_host_mak echo "OBJCOPY=$objcopy" >> $config_host_mak echo "LD=$ld" >> $config_host_mak +echo "RANLIB=$ranlib" >> $config_host_mak echo "NM=$nm" >> $config_host_mak echo "WINDRES=$windres" >> $config_host_mak echo "CFLAGS=$CFLAGS" >> $config_host_mak @@ -6782,6 +6784,7 @@ for rom in seabios vgabios ; do echo "OBJCOPY=objcopy" >> $config_mak echo "IASL=$iasl" >> $config_mak echo "LD=$ld" >> $config_mak + echo "RANLIB=$ranlib" >> $config_mak done # set up tests data directory -- cgit v1.2.3-55-g7522