From patchwork Tue Dec 25 20:55:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 154493 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5219101ljp; Tue, 25 Dec 2018 13:13:15 -0800 (PST) X-Google-Smtp-Source: ALg8bN4uA7HJ16KumlKMQE6I9A1UagIJtG1Z+AevJBCmqni5QzoNjglhUTDL0KIG96LfE9k3pk0V X-Received: by 2002:a37:1ad9:: with SMTP id l86mr15332777qkh.54.1545772395433; Tue, 25 Dec 2018 13:13:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545772395; cv=none; d=google.com; s=arc-20160816; b=I21kP0TjjYRZdSW2iQF1XurzvAGJV6eBdnddNN/cVChd6M8jlpzguo8O7osFhW+Exr rY4JL06vi8YtSrRlFVYgBN+4t8uzHVv5NPKdNoC2VmjUZYDe7nos1SvB4XsMS2EISkZ3 AmFUb2CW7mqnOhgrYL5+K+BMBmdBS2cR3Xj9yEiL3PA4id5VMqrkwaK09IN0vsPOOFw1 GU5RpF41Q1UW9VGa2jjYMc1JbBFlvfehK8lyQia0U+KibLZBt3YMjnuzuS0PybT4+HFu Ur/WuxjmDXfYi/ixIulAarWP1FZsk/lc8mma/V87U3p+UXV0VPXXLR64MKOxpvoNner1 M84Q== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=QfJmX8ZC2bPjCp6gRCMSRWnGdIZ017Tc1p332ub6Teg=; b=HNtgiw2YJIju8QCuqWJMO6ysRCVYqhRC62AHTu0iWc4w3Esntl5YOwEh0NDAYJSHWH 4xEm4EhRv/DwBxutF5/D2740BvFAkKnNKKFb6LCdKzLtafPIwiXw1lsWCIuhIJsaOvPg iKOzatS139Y4q/Sgr9lcyUHkNR3Revqgde3jNO287RlsBYniGotlzhxZy5LwgWxYKtoT BX0f1QCQ4yKPn6MBbuRdlUaARHZUkXeOcZY7zCLJiH1ZN8gMXFsVIoFQU187bDdcincx KKLTQSlk1whwyMxobE+h+rxI9cTuJeyKh9dbesx2Wzpb21BwDER17whh8D//pdNGWGJR /Nhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VvztILgh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 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. [208.118.235.17]) by mx.google.com with ESMTPS id l5si4252256qtr.32.2018.12.25.13.13.15 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 25 Dec 2018 13:13:15 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VvztILgh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 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 ([127.0.0.1]:43166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbu0o-0000H0-Qu for patch@linaro.org; Tue, 25 Dec 2018 16:13:14 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbtml-0006eh-Tt for qemu-devel@nongnu.org; Tue, 25 Dec 2018 15:58:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbtmk-0000Zo-1q for qemu-devel@nongnu.org; Tue, 25 Dec 2018 15:58:43 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:46318) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gbtmj-0000WK-SJ for qemu-devel@nongnu.org; Tue, 25 Dec 2018 15:58:41 -0500 Received: by mail-pl1-x62d.google.com with SMTP id t13so6794664ply.13 for ; Tue, 25 Dec 2018 12:58:38 -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; bh=QfJmX8ZC2bPjCp6gRCMSRWnGdIZ017Tc1p332ub6Teg=; b=VvztILghD5baApypAaXYMOLgs1jXL3KRxpnrKkkMa8FkJWLIooy/5XHyZB/zLLLzaS Ivn7Uy7DMdmQ9ulBvowjKPulA9rxjKqhJq1Oaq2y0J/G70V+Ko3PvDBY4Ee2LQaMydbP rh7cHxX7AF1p0FAeqsqZfTGGfrMgSDuT1kX98= 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; bh=QfJmX8ZC2bPjCp6gRCMSRWnGdIZ017Tc1p332ub6Teg=; b=dCGKCcn7DSI0WP3FjvKYvn8XKmqAdJZm9iOGKA/FFKfE0yXsVz/5vkk+cgyM8xSXoy FPMTkh/1mYVcJpttuWaPsWcNFo0DPWm0QYgW3tlb98EawFLNZpHDnz+SpUD+uGbkIz1E 23kwcsvQv/w5Gbm0VISOZjiSJBGyFfC+ar0h4O3MvEXixayahn4PqiwCcx4mFiaJ3Kzz +lI1+ULWmFSZzmFAGlIAipC6UEcM2xllBogpo+I078XhE8yHqyYBchk5HuO9uObimAyz JIH+53v3gSaBvQuRpOleGHZGQs8705oZxM6xR/B/9h3BDrqQUBggoW9r5cO6s0Ggavem eowQ== X-Gm-Message-State: AJcUukeXCR3dxLT0G9JL5Wm1tUwHsCUYV5dylx60RTdg+QS9pLzKmB9/ SxY7AMemkM8qovNnanZsfp8RiPpYmQ8= X-Received: by 2002:a17:902:7791:: with SMTP id o17mr17210628pll.60.1545771517444; Tue, 25 Dec 2018 12:58:37 -0800 (PST) Received: from cloudburst.home (c211-28-135-144.sunsh3.vic.optusnet.com.au. [211.28.135.144]) by smtp.gmail.com with ESMTPSA id t21sm48501628pgg.24.2018.12.25.12.58.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Dec 2018 12:58:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 26 Dec 2018 07:55:10 +1100 Message-Id: <20181225205529.10874-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181225205529.10874-1-richard.henderson@linaro.org> References: <20181225205529.10874-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::62d Subject: [Qemu-devel] [PULL 23/42] configure: Add support for building RISC-V host 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, Michael Clark , Alistair Francis Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alistair Francis Signed-off-by: Alistair Francis Signed-off-by: Michael Clark Reviewed-by: Richard Henderson Message-Id: <52160afacecc5b109dc43a412fa3e74ddd6277fb.1545246859.git.alistair.francis@wdc.com> Signed-off-by: Richard Henderson --- configure | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -- 2.17.2 diff --git a/configure b/configure index 224d3071ac..79375affc1 100755 --- a/configure +++ b/configure @@ -710,6 +710,12 @@ elif check_define __s390__ ; then else cpu="s390" fi +elif check_define __riscv ; then + if check_define _LP64 ; then + cpu="riscv64" + else + cpu="riscv32" + fi elif check_define __arm__ ; then cpu="arm" elif check_define __aarch64__ ; then @@ -722,7 +728,7 @@ ARCH= # Normalise host CPU name and set ARCH. # Note that this case should only have supported host CPUs, not guests. case "$cpu" in - ppc|ppc64|s390|s390x|sparc64|x32) + ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64) cpu="$cpu" supported_cpu="yes" eval "cross_cc_${cpu}=\$host_cc" @@ -6937,6 +6943,8 @@ elif test "$ARCH" = "x86_64" -o "$ARCH" = "x32" ; then QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/i386 $QEMU_INCLUDES" elif test "$ARCH" = "ppc64" ; then QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/ppc $QEMU_INCLUDES" +elif test "$ARCH" = "riscv32" -o "$ARCH" = "riscv64" ; then + QEMU_INCLUDES="-I\$(SRC_PATH)/tcg/riscv $QEMU_INCLUDES" else QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/\$(ARCH) $QEMU_INCLUDES" fi @@ -7433,7 +7441,7 @@ for i in $ARCH $TARGET_BASE_ARCH ; do ppc*) disas_config "PPC" ;; - riscv) + riscv*) disas_config "RISCV" ;; s390*)