From nobody Tue Feb 10 12:42:56 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621328972; cv=none; d=zohomail.com; s=zohoarc; b=fxk9+dni4X/9r2iXmZMbtazC9K/HqgDuqMdr12eP0/QpftjzzAKa+fkhw5yElWrjuRAkJF7a33hdUpCp5Lue/FF5r+pBr7NyT6i2LR8uhTkZDYkCTN+/rjAe/RHuWCP+V/V+YeFGDTTj2hRTfWCKt6+/dYFKGDBU3Fe6yesEvX4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621328972; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Vc8LrTg4vVRcCUK0lAtqysrbfC1yfp+yZGcfve2xqWo=; b=leky1awF8UwCjVybFvM2zYw9G7RJM8PulFYP0qKJNvD38omE5NMzGyW8fDTsbHm5G30O4x8Nblx0954MJyr6bsCfITu03YslJilcJq8vTOUCBd1S20NjGuJVfw65PuAJRqmrA+7IxbMWnbmPU32/aRxWbhX3z8W2xGa7vPyDtv4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162132897255437.48772421802323; Tue, 18 May 2021 02:09:32 -0700 (PDT) Received: from localhost ([::1]:36852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livjH-0002Y0-AE for importer@patchew.org; Tue, 18 May 2021 05:09:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhQ-00085o-WA for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:37 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:38838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhM-0005UX-S0 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:36 -0400 Received: by mail-wr1-x433.google.com with SMTP id j14so7587737wrq.5 for ; Tue, 18 May 2021 02:07:32 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f8sm16184927wmg.43.2021.05.18.02.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A93B71FF96; Tue, 18 May 2021 10:07:21 +0100 (BST) 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=Vc8LrTg4vVRcCUK0lAtqysrbfC1yfp+yZGcfve2xqWo=; b=NofdYuN1UIyVr2MKvADN1ap9i5m88RB4wXIrUFdo5rqI1tdKBG7j+vsDaNVxtOm2iu jiO8RyFaqmUSXwNI4LymqSjwp1CG/7aycnICIXmOUwdckqFX86CHkyReOyAcxqFVxPwL gjj83+saf4aegVXI3FnKRI5ky1HKzAgDdHv4A62bv0EEFzQCyVOc+NKWDFgj7CWnIMSF M4Lu7m/4QQqRa98/cXpKeEceTfrjrcY+yz+IbcuK/Oy5fYCVZNlzO/u9sxn+T/3izekA vx17sHPCv1jABgncshtt58QbAt6vens70HzA9n1NFO7cpeo/OI8REVnK33QDzm+4opG4 0yAQ== 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=Vc8LrTg4vVRcCUK0lAtqysrbfC1yfp+yZGcfve2xqWo=; b=blZAjV3spXDon6Jbpn60bgEiZFyxPSKPPmS84PCRAUVLCfKPrjfJ7Sdl0cfK++Qelr u4lXyS54FO+j7PKGgBgBIsBQv+Dq4SjsUnJCElOVmlZzYV6NkKU/5iWChUFHCSRQv/bR kdh1ijYUCO82yFZgMDvRIOid48PiJLL9AcB4zrbSbgXsOcbz9+dSUilM2Rgt2BmvjDkI O1+hNww0CuIig2F1VeR9GxCP+25uv/3PxCpyEtUNl1MnYH00gdqjzx/bbooy+QVu62sk +IC9CQvT138DotujTU1So1YZiccLgjxizbV6bE+vcqUZQIoHVtf+BFuU29Z3DJumy66q EREQ== X-Gm-Message-State: AOAM531EExkkcYc/eMN9vbdjPtZuJVFOc7imzYTykfBcd1Bp9g0cOmqF pmIcudve8hvqfiENHBVrGB30N2Wk5aBuwg== X-Google-Smtp-Source: ABdhPJxKU31PyhUdvtdpmAdvUgjiVr+AB6zHGhS4sCFvYO7utyV1PeY7+8CVP5NBSCTo3mz9fu5mfQ== X-Received: by 2002:a05:6000:1c1:: with SMTP id t1mr5432842wrx.421.1621328851451; Tue, 18 May 2021 02:07:31 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 08/29] tests/tcg: don't iterate through other arch compilers Date: Tue, 18 May 2021 10:06:59 +0100 Message-Id: <20210518090720.21915-9-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.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: =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) There should only be one compiler per architecture. Those cases where the same compiler can deal with a different architecture should be explicitly set for both cross_cc and docker configurations. Otherwise you get strangeness like: --cross-cc-aarch64=3D/bin/false causing the logic to attempt to use a locally available arm-linux-gnueabihf-gcc rather than forcing the use of the docker image which is what is implied by the command line option. Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210512102051.12134-10-alex.bennee@linaro.org> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index cf6062a15f..e6c1be5450 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -74,35 +74,6 @@ fi =20 for target in $target_list; do arch=3D${target%%-*} - case $arch in - arm|armeb) - arches=3Darm - ;; - aarch64|aarch64_be) - arches=3D"aarch64 arm" - ;; - mips*) - arches=3Dmips - ;; - ppc*) - arches=3Dppc - ;; - sh4|sh4eb) - arches=3Dsh4 - ;; - x86_64) - arches=3D"x86_64 i386" - ;; - xtensa|xtensaeb) - arches=3Dxtensa - ;; - alpha|cris|hexagon|hppa|i386|microblaze|microblazeel|m68k|openrisc|ris= cv64|s390x|sh4|sparc64) - arches=3D$target - ;; - *) - continue - ;; - esac =20 container_image=3D case $target in @@ -236,70 +207,69 @@ for target in $target_list; do echo "CROSS_CC_GUEST_CFLAGS=3D$target_compiler_cflags" >> $config_target= _mak =20 got_cross_cc=3Dno - for i in $arch $arches; do - if eval test "x\${cross_cc_$i+yes}" !=3D xyes; then - continue - fi =20 - eval "target_compiler=3D\${cross_cc_$i}" - if ! has $target_compiler; then - continue - fi - 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 - continue - fi - echo "CROSS_CC_GUEST_STATIC=3Dy" >> $config_target_mak - else - echo "CROSS_CC_GUEST_STATIC=3Dy" >> $config_target_mak - fi - echo "CROSS_CC_GUEST=3D$target_compiler" >> $config_target_mak + if eval test "x\${cross_cc_$arch}" !=3D xyes; then + eval "target_compiler=3D\${cross_cc_$arch}" =20 - # Test for compiler features for optional tests. We only do this - # for cross compilers because ensuring the docker containers based - # compilers is a requirememt for adding a new test that needs a - # compiler feature. - case $target in - aarch64-*) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=3Darmv8.1-a+sve -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_SVE=3Dy" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=3Darmv8.3-a -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_3=3Dy" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -mbranch-protection=3Dstandard -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_BTI=3Dy" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=3Darmv8.5-a+memtag -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_MTE=3Dy" >> $config_target_mak - fi - ;; - ppc*) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -mpower8-vector -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_POWER8_VECTOR=3Dy" >> $config_target_mak - fi - ;; - i386-linux-user) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -Werror -fno-pie -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_I386_NOPIE=3Dy" >> $config_target_mak - fi - ;; - esac + 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 + got_cross_cc=3Dyes + echo "CROSS_CC_GUEST_STATIC=3Dy" >> $config_target_mak + echo "CROSS_CC_GUEST=3D$target_compiler" >> $config_targ= et_mak + fi + else + got_cross_cc=3Dyes + echo "CROSS_CC_GUEST_STATIC=3Dy" >> $config_target_mak + echo "CROSS_CC_GUEST=3D$target_compiler" >> $config_target_m= ak + fi + fi + fi =20 - enabled_cross_compilers=3D"$enabled_cross_compilers $target_compiler" - got_cross_cc=3Dyes - break - done + if test $got_cross_cc =3D yes; then + # Test for compiler features for optional tests. We only do this + # for cross compilers because ensuring the docker containers based + # compilers is a requirememt for adding a new test that needs a + # compiler feature. =20 - if test $got_cross_cc =3D no && test "$container" !=3D no && test -n "$c= ontainer_image"; then + case $target in + aarch64-*) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=3Darmv8.1-a+sve -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_SVE=3Dy" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=3Darmv8.3-a -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_3=3Dy" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mbranch-protection=3Dstandard -o $TMPE $TMPC= ; then + echo "CROSS_CC_HAS_ARMV8_BTI=3Dy" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=3Darmv8.5-a+memtag -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_MTE=3Dy" >> $config_target_mak + fi + ;; + ppc*) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mpower8-vector -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_POWER8_VECTOR=3Dy" >> $config_target_= mak + fi + ;; + i386-linux-user) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -Werror -fno-pie -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_I386_NOPIE=3Dy" >> $config_target_mak + fi + ;; + esac + elif test $got_cross_cc =3D no && test "$container" !=3D no && \ + test -n "$container_image"; then for host in $container_hosts; do if test "$host" =3D "$ARCH"; then echo "DOCKER_IMAGE=3D$container_image" >> $config_target_mak --=20 2.20.1