From patchwork Wed May 12 10:20:50 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: 435493 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp4698951jao; Wed, 12 May 2021 03:38:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1fcTq02WfHSYYBE+0dO1P95bF1Xhh6APjjJcZkzNM0AkGAT5bQQ2FUuq0cBMleA097gcH X-Received: by 2002:a67:ee4e:: with SMTP id g14mr32134113vsp.37.1620815911941; Wed, 12 May 2021 03:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620815911; cv=none; d=google.com; s=arc-20160816; b=eyqgz9CskTJrQs7L/MpdA5XSAK5W5kIuNPC1OJ1oCSnVufHFWOupR79L7kAAaGfmNr zZD+I8UeqX/0KoSmCNqA9JJXK9PNnJNrhwXbeaYIZeE4cnvhqK2NBpW0dSMnjbJGeEcT qqI0if3pP+6RT5N4Ni2q1bpUtYCnve7PL3kg5rAPkLGUAd8Tmp5bnO6ejhLkoMp/OxVj qm8CMZj8Jo4HdC/wgf+y9MWS7WzdAgsAUd+22CEt66pLXeHmve02/QKGI3/+MkSVxVQi cs3WX8k7hZMvLntvyj/s7O3rArQQNOAWqtqu+Jvn+1U+m1N1dQf05fISymtN7PTouF3F kEnQ== 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=k04YBeQVw1SV/5Xi/ZAFYyy3Jt24dK+QTEr9uqlEOFU=; b=GHzvQNvbbLQmuQG4fYeb6JRaG7mRed6zFN/mRis1naVBE2pLrMXohHDsVQ9Fd/YQiz LfNAU6ig+s0IZspfAYeDP5SGxojy+lj6mRbwqT+c3ciwt3Y0LeD8mvVdYG/xOfHu5PHO 1l24TYJWqZdzywhPM/N9ZWpSeiN4b/C2GFIR/d/8kdgTKRvngqMQG93wLSHN9qpnKcP0 pfAxCjuGlLUpkD97+CplWDrpTZjRqCbkaUz2r1HBa5mjKm23OxLcSE64c1+QsyW6HBKx +cgr3zV9g0VHEp3retS5QWuUcxhNhwR6M3pgDkxK+g7CuR5mYt0Tftz5IaZxIBi4RZst sdCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="bhERa/jn"; 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 e29si11294226uaf.195.2021.05.12.03.38.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 May 2021 03:38:31 -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="bhERa/jn"; 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]:53322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgmG7-0007yl-9L for patch@linaro.org; Wed, 12 May 2021 06:38:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgm8X-0000bH-Pz for qemu-devel@nongnu.org; Wed, 12 May 2021 06:30:41 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:41519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgm8N-0000aD-Cz for qemu-devel@nongnu.org; Wed, 12 May 2021 06:30:41 -0400 Received: by mail-wr1-x42f.google.com with SMTP id d11so23064162wrw.8 for ; Wed, 12 May 2021 03:30:30 -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=k04YBeQVw1SV/5Xi/ZAFYyy3Jt24dK+QTEr9uqlEOFU=; b=bhERa/jn8Vq/kr2DB9xcfczWpUVJotIuK6C2IMsdhQ5hrWgQt11iSjoPGiA23yuWoY 7XhkGCuxTJj1ORtSUfZvd9ybMMXLlt9SnNvd9i8JexrFXru2hvkY+HukCv/tYUI/tppl GLuGziv0hgsvdickfjMgT4SAePlmxaG4g7uTtiRr7Nb9BJ4pZVE+XJKBhJOiR9hpMe6d QvBgEiyYv9qLmd7suuRqJ4kg+3GdGzxbXtBwhRv6Vf0VmELCA3nZ6IXtt7HCSdKGdiIh g5Uo8e1lFe+LAjfOO0mAY3knT/6A145hnP5nC4ZvrUbbaGzuoTy4IIXfLsQ2HiWlXyIK gNRA== 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=k04YBeQVw1SV/5Xi/ZAFYyy3Jt24dK+QTEr9uqlEOFU=; b=SwA3K0idSY2AQn1Aj/OVZFHQTfobPgV/2lxNGznJFg+HwB5Vm5RgM8q/xJxP5UmqNR ZKO/5R0GMjxFfqGq6/xlSUVXrj55zbTt8nzklQjhiSamQmqF4C3w6MXv7khFVtNeWi7o XWbUx/foVQHT8jJk5a5OvZKg6B92EmF+D1QBs9hzCMGiyuctfUebeN0Q5MgPYo7ylVf3 XbnnQOPIZVksE3CW70CLrPuivlKkaC9489TwVN1/AO+GZqzKOiISu49RWZb96BaGGevb gfHvyVjdOaHDWMOYBX7TdQbgRE2asJwN0NYrIGIAwNJI1nx3ms28kGLIaqOgEYHNybZL H6ug== X-Gm-Message-State: AOAM5303TTHUpmRbKIjQ6wnYmZrlF1o0yHwhdD0E7vzkwxj8Rn1VUanI hGdPuwDL3cakZqkm49+MDoLc0A== X-Received: by 2002:a5d:6085:: with SMTP id w5mr45625396wrt.14.1620815429320; Wed, 12 May 2021 03:30:29 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id y2sm6558416wmq.45.2021.05.12.03.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 03:30:23 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 358081FFB7; Wed, 12 May 2021 11:20:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 30/31] tests/tcg: don't allow clang as a cross compiler Date: Wed, 12 May 2021 11:20:50 +0100 Message-Id: <20210512102051.12134-31-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210512102051.12134-1-alex.bennee@linaro.org> References: <20210512102051.12134-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.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=ham 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: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net 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 --- tests/tcg/configure.sh | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) -- 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