From patchwork Thu Nov 9 07:52:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 118384 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp622294edl; Wed, 8 Nov 2017 23:54:47 -0800 (PST) X-Google-Smtp-Source: ABhQp+SYhGTbuWNhnY3RyLCcrzcgmLRvkB49HbhjgUPwnlwcv+PilniZ88Yrk2z7X4bQSNS1g7xS X-Received: by 10.37.160.8 with SMTP id x8mr1974835ybh.89.1510214087704; Wed, 08 Nov 2017 23:54:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510214087; cv=none; d=google.com; s=arc-20160816; b=ZdFn+8dXSg+XqYvsIP6mE4jGtiusR+KEW55RLz0Tk02TKyjZpIjt/ynOQt/rjNX/0f /lm+yp6Xp410R9DC8FssKoRYPRaHRP28dUH88NeLu2HABygLnb+kWgPbkAVq70Vz8U79 qiYuD+WjWBGl8EumC5JiymESA/CzOsDrrsG/hjK/rr8Buh6iONiu1mUMTQn74CsW43Sx SQsY5RYy1vYGkxPJ7c8O2R6hCSs2UYwCePPIkyY+J/drl4o+VkVYXc1uJKTetZ6LE95m wH/LLk22B4OstJPCMtc3X2P3b+IFVqT1Nm210Vh2l/IRSMKYENlRaUWEH578JyZQp3oq rWXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=34bOoYZwlwrp8LOq9HUYhJTqmVUllOkk8ByM2DkTtX0=; b=ZV/ypNmZt3yzDbpfWxkKuHjLibaFJDAUXk4Lf3B3ZSN92FWqvmhtDKRTnBzWfijHS5 79F0iOKetH0wqxCcR0pveIgD0/2/6jHXZTJbG2Qi/FBdsCEBXsfuCQJmBdTS5vpT52+z 5WMCFxt3Hafp8DbI9QNTXYra6BW+BrJpmJjyxyLIFx2xtrKi9tdK5HOMtT+6vTPt5eU0 Oyw8mcdfEB6MCIR9jRXqI+vVi93PHRhmL2yeW5kX1IV2aa1U7MOtfCMwSwxTmV4wSzrY cK2ygCpa3czexeGwenm89tw+O/+Zgi31bYmGy8f2v9gmpANhS/FDmSsAddL15WMw+xSq 9Mjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IS7dYYtC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id w8si1435509ybe.806.2017.11.08.23.54.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 08 Nov 2017 23:54:47 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IS7dYYtC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eChfj-000379-6B for patch@linaro.org; Thu, 09 Nov 2017 02:54:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eChdr-0002W6-J7 for qemu-devel@nongnu.org; Thu, 09 Nov 2017 02:52:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eChdq-0000Wf-Dj for qemu-devel@nongnu.org; Thu, 09 Nov 2017 02:52:51 -0500 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:43330) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eChdq-0000WH-6H for qemu-devel@nongnu.org; Thu, 09 Nov 2017 02:52:50 -0500 Received: by mail-wr0-x243.google.com with SMTP id 4so4734779wrt.0 for ; Wed, 08 Nov 2017 23:52:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=34bOoYZwlwrp8LOq9HUYhJTqmVUllOkk8ByM2DkTtX0=; b=IS7dYYtC7q7ZwjxAr9xKEE2FffR1TC9r0JIK4OYKsASwdIqBZmAS5GtZU/Q+6e4e83 pB1jdsXarSpUFzwf1X1MHOUtsfv87NYOLKPZNWnqGqGtuwi+OG6Jv2kAbeBqN5kvEApP flYyd0iEFGRN80ZS+oC+PM9xD4Z2fOKaiiH4w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=34bOoYZwlwrp8LOq9HUYhJTqmVUllOkk8ByM2DkTtX0=; b=AKsypOoAzTHQRxlr/EnUfyotE4eOnWrJnWR2Yp+Ew9PkRvwmVifoOMOa34ATA6dUyU +88aB/wzYeAqboBCYsGWZvDU0qROKOb0doKRnk+vauRJzm53Y7v0zaRnl9iiAepQsWlZ 8we5xakDg+GvmukedfDVatHw2pxaWsv+S370bJgxr0+wwUtsusyZHEBBuKe8YTajna5v VZ4Z933IVzEM9s5WWUCktppg5DcBOfmlAtBs5NWrN6RIaaJzhYcW5vq9KkLzjW2T83pG xzi+sr0Hp9NffU/uNsr92XlKR4pnM75WIFUeuezPeCbtOqATj+5IHePPCFRJIK+PcAm2 yJtg== X-Gm-Message-State: AJaThX6DeHCCS/LbJqYJh4J20q2kZ4tlc5hXQ1eVWkpyyEAyxE1tAyJr tyDbtlASckaHXxnavNSe+DpjM9GgBtM= X-Received: by 10.223.134.106 with SMTP id 39mr2459469wrw.134.1510213968853; Wed, 08 Nov 2017 23:52:48 -0800 (PST) Received: from cloudburst.twiddle.net (93-45-2-58.ip99.fastwebnet.it. [93.45.2.58]) by smtp.gmail.com with ESMTPSA id g65sm2856109wmf.5.2017.11.08.23.52.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Nov 2017 23:52:47 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 Nov 2017 08:52:43 +0100 Message-Id: <20171109075243.4794-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171109075243.4794-1-richard.henderson@linaro.org> References: <20171109075243.4794-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PULL 2/2] Makefile: Capstone: Add support for cross compile ranlib X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Alistair Francis Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alistair Francis 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 --- Makefile | 2 +- configure | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) -- 2.13.6 diff --git a/Makefile b/Makefile index 0496c5057a..814f6820d9 100644 --- a/Makefile +++ b/Makefile @@ -405,7 +405,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC CAP_CFLAGS += -DCAPSTONE_HAS_X86 subdir-capstone: .git-submodule-status - $(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)) + $(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)) $(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \ $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY)) 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