From patchwork Tue May 18 09:07:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 441184 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp48419jac; Tue, 18 May 2021 02:29:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlZHFO30PkeUE86f+CrkbGJGvBdJ3JeaZZnRcWBDYZqua+KpbE+t7TL4ZDieKtBf/aiCCu X-Received: by 2002:a25:204:: with SMTP id 4mr6241280ybc.342.1621330174123; Tue, 18 May 2021 02:29:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621330174; cv=none; d=google.com; s=arc-20160816; b=Edzaq/SeFX89q4OtWF4wBaxfRowa3YUDl+yaxHXMhRCaInKEZXK/sZiFexxQrUwq3r dFsY3kYSPn1ag7lOCH+ql+3xWHnBnARJ3sscrEO6wK5hrPxZwKW0N9yPe5ijtKS9vf6b 2M0sWSpcQoQrA1YgYZytAW5EH5GmhUge136TqLjvLWk3ii3dtly5C+o3/kCgP7bKQPIy AofMu5y0/NP2GcIMKdoFHPYo2oJya/vug41YzOXZU0eY6fqy+YxFFyZpr9+LxGYegz6A xn21PtWOtui3zo6CwyrOUbVubGFl+hfS3gJPWLpR6D952qBoiZ3QH8litg9zq9GskHpF rnEw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Mn6SaZ8plyB0/DLAD6T6WLKOaxQYkXa/tSd0uVFivYE=; b=D+JFSJ/UeSty3PLJD5kp0cGk0IXVA1S6YJbbUSp9ErdUYp4R7g5vabWLQHV4n367G8 NtKDGFl3HGd50uVmA3c9dzwdX9BZ1g8pZfG7OCawwRx1cx2157RkddYu3iM+gUntnCAx DQcNbKl0aUNPUxi3PBoEquuli+LkhdA5c2tPgR8YsJ7c5KpGXkja2h6QSykICo3jH+Xp C5VlNxvgF6m1d5J3qzx4z69aAjvQtRGFgk7GMol8eLstHwqZJhlF6FTHuZn4OPOqLLOX ZsDv7mi9aHvaY1Ed/YHeNKN0QjitDyLkC9guQpTNZent5SZZFWiflvTYMQiezqziU5OE KcXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="T/NAnNMQ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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. [209.51.188.17]) by mx.google.com with ESMTPS id j18si4889424ybm.248.2021.05.18.02.29.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 May 2021 02:29:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="T/NAnNMQ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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 ([::1]:33116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw2f-0004PO-HM for patch@linaro.org; Tue, 18 May 2021 05:29:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp2-00054G-Qi for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:29 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:46906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livor-00010l-7g for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:27 -0400 Received: by mail-wm1-x32c.google.com with SMTP id h3-20020a05600c3503b0290176f13c7715so1050236wmq.5 for ; Tue, 18 May 2021 02:15:16 -0700 (PDT) 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=Mn6SaZ8plyB0/DLAD6T6WLKOaxQYkXa/tSd0uVFivYE=; b=T/NAnNMQMtJuJqPGnOvZM9pMZP6qu16G/dwEQ6BUVu1nR3Vrr0ypq/9VjnUL7AKKRS ZExWwOuiN7+JpcxMdlODVM8IKjJCuKUCqQpySj4fS27i/LAE7tLwUkROWtBoyDkyf7hH 1l0WPsib1xqPSo1BjzcJ9dr33Pjg0S3T09zNPzIleq1HPBD2CU5H56d0GHOTgDuMZ9ki /yivzFVUwjvYOwg2dkGrLiVM7zdaM2cJCHPViyp0lAFx2chLC39SNcHyM/8ZANlaA1Hy XHnc9REZiP61BczUikhk9UJz1aioos5O6SuO6ccVqKYdG2uiQSBrOt8Wq8HepmiX4us7 CpVw== 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=Mn6SaZ8plyB0/DLAD6T6WLKOaxQYkXa/tSd0uVFivYE=; b=nlRHgJ2fIzI8LRwqy+86V/DnjDtCCL9dHmUjoO2ar3EACig99zMspxKSW/XqP5p0xl QdtxDfjJSCFhd6JMWiKeZe2EjRj56J8CpUuBLxSkOgo2KMHYI0EgVjHUKtJX0gsF+Eo+ a6UJbvuZZbF/Vz6W34sdO70J8ltwRlxRt1s35+R8nYqOG06Jz8IT+08Nlv/dDlpkA9cU WIG4cV4mX4WjyXpMgmaL8Cv39TUIyssjywX3AYvYHwT3cljyBJbxJUWKrSzch02xQdsL 02bkkdQLtfYNOS3esmjx/6BH5i8oJ4GKbhQAUJ5rIxlJsUUinqyssb7NIQolSXFYDtrF zcGw== X-Gm-Message-State: AOAM531JtT/ETXwA8b/SO3YyKRGfsxJN1Ygo32+lHgX2/RSoey+a4Wdy cvVHjPJGtPamwTAs6A5s3wElvw== X-Received: by 2002:a7b:c093:: with SMTP id r19mr4319577wmh.35.1621329315938; Tue, 18 May 2021 02:15:15 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f188sm1977697wmf.24.2021.05.18.02.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 98E431FFB4; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 28/29] tests/tcg: don't allow clang as a cross compiler Date: Tue, 18 May 2021 10:07:19 +0100 Message-Id: <20210518090720.21915-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Currently there are two problems. The first is clang generates a preamble (that is always executed) to stack xmm registers. This causes a ILLOP on the x86_64 softmmu tests as SSE isn't enabled. The second is the inline assembler in test-i386.c breaks clangs compiler and I don't know how to fix it. Even with Theodore's patch series (D5741445-7EFD-4AF1-8DB2-E4AFA93CBB1A@icloud.com) I still get compiler failures. For now lets just skip clang and allow it to fall back to the containers which we know have compilers which work. Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-31-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 6627318adf..ed6492ce59 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -82,6 +82,9 @@ for target in $target_list; do container_cross_as= container_cross_ld= + # suppress clang + supress_clang= + case $target in aarch64-*) # We don't have any bigendian build tools so we only use this for AArch64 @@ -119,6 +122,7 @@ for target in $target_list; do container_hosts=x86_64 container_image=fedora-i386-cross container_cross_cc=gcc + supress_clang=yes ;; m68k-*) container_hosts=x86_64 @@ -186,6 +190,7 @@ for target in $target_list; do container_hosts="aarch64 ppc64el x86_64" container_image=debian-amd64-cross container_cross_cc=x86_64-linux-gnu-gcc + supress_clang=yes ;; xtensa*-softmmu) container_hosts=x86_64 @@ -200,6 +205,7 @@ for target in $target_list; do echo "# Automatically generated by configure - do not modify" > $config_target_mak echo "TARGET_NAME=$arch" >> $config_target_mak + echo "target=$target" >> $config_target_mak case $target in *-linux-user | *-bsd-user) echo "CONFIG_USER_ONLY=y" >> $config_target_mak @@ -219,21 +225,26 @@ for target in $target_list; do if eval test "x\${cross_cc_$arch}" != xyes; then eval "target_compiler=\${cross_cc_$arch}" - if has $target_compiler; then - write_c_skeleton - if ! do_compiler "$target_compiler" $target_compiler_cflags \ - -o $TMPE $TMPC -static ; then - # For host systems we might get away with building without -static - if do_compiler "$target_compiler" $target_compiler_cflags \ - -o $TMPE $TMPC ; then + if has "$target_compiler"; then + if test "$supress_clang" = yes && + $target_compiler --version | grep -qi "clang"; then + got_cross_cc=no + else + write_c_skeleton + if ! do_compiler "$target_compiler" $target_compiler_cflags \ + -o $TMPE $TMPC -static ; then + # For host systems we might get away with building without -static + if do_compiler "$target_compiler" $target_compiler_cflags \ + -o $TMPE $TMPC ; then + got_cross_cc=yes + echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak + echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + fi + else got_cross_cc=yes echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak fi - else - got_cross_cc=yes - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak - echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak fi fi fi