Revisión | 9f81aeb5dadab588920b157a4610e890995ef4b9 (tree) |
---|---|
Tiempo | 2017-11-09 16:47:14 |
Autor | Alistair Francis <alistair.francis@xili...> |
Commiter | Richard Henderson |
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:
index; run ranlib to add one
$ x86_64-w64-mingw32-ar --version
GNU ar (GNU Binutils) 2.25
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <e457d4e906dceea4de6c3431813a06b137c1ab9c.1510103351.git.alistair.francis@xilinx.com>
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
@@ -405,7 +405,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC | ||
405 | 405 | CAP_CFLAGS += -DCAPSTONE_HAS_X86 |
406 | 406 | |
407 | 407 | subdir-capstone: .git-submodule-status |
408 | - $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE)) | |
408 | + $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE)) | |
409 | 409 | |
410 | 410 | $(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \ |
411 | 411 | $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY)) |
@@ -482,6 +482,7 @@ ccas="${CCAS-$cc}" | ||
482 | 482 | cpp="${CPP-$cc -E}" |
483 | 483 | objcopy="${OBJCOPY-${cross_prefix}objcopy}" |
484 | 484 | ld="${LD-${cross_prefix}ld}" |
485 | +ranlib="${RANLIB-${cross_prefix}ranlib}" | |
485 | 486 | nm="${NM-${cross_prefix}nm}" |
486 | 487 | strip="${STRIP-${cross_prefix}strip}" |
487 | 488 | windres="${WINDRES-${cross_prefix}windres}" |
@@ -6288,6 +6289,7 @@ echo "CCAS=$ccas" >> $config_host_mak | ||
6288 | 6289 | echo "CPP=$cpp" >> $config_host_mak |
6289 | 6290 | echo "OBJCOPY=$objcopy" >> $config_host_mak |
6290 | 6291 | echo "LD=$ld" >> $config_host_mak |
6292 | +echo "RANLIB=$ranlib" >> $config_host_mak | |
6291 | 6293 | echo "NM=$nm" >> $config_host_mak |
6292 | 6294 | echo "WINDRES=$windres" >> $config_host_mak |
6293 | 6295 | echo "CFLAGS=$CFLAGS" >> $config_host_mak |
@@ -6782,6 +6784,7 @@ for rom in seabios vgabios ; do | ||
6782 | 6784 | echo "OBJCOPY=objcopy" >> $config_mak |
6783 | 6785 | echo "IASL=$iasl" >> $config_mak |
6784 | 6786 | echo "LD=$ld" >> $config_mak |
6787 | + echo "RANLIB=$ranlib" >> $config_mak | |
6785 | 6788 | done |
6786 | 6789 | |
6787 | 6790 | # set up tests data directory |