From nobody Tue Feb 10 16:27:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1648477096; cv=none; d=zohomail.com; s=zohoarc; b=Vn6xONOQWek+TI3ZZ9ptVQRSAE1Oq9AMWjcPfj+0Lg/ThyWe9vsViUQHyavrbm/pm4PXdGgYSVE4RFsLi2dTL8idS+nMVpS3oCV/3diAllRBLgOqFiJIkI6xqawLoevnpPySwwjtdSpm94IPynFClXaEsSbkz0z246Q835LIBQA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648477096; 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=XHu35xixtOXF2QZwH4fi0BxlwmUduhoXGGqYHt4rBM0=; b=hGL3VYzqzFWTrm4SHbDJa4HIZY6FKCbs9X6RX15vZ7sNxgWMj15QhA+pCYVhZstiI5pUR3rssJhPTUKb/csj9MGXiu75BfnRBiH01nARCiwTcMot1M/cAu/X7bAzpqoSx3jXfv8rt5yWgPBMMuE+5OJSKyDkWnGJ9TtOwIm8fTI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 164847709675180.39175761783633; Mon, 28 Mar 2022 07:18:16 -0700 (PDT) Received: from localhost ([::1]:58348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYqCF-0005GI-9U for importer@patchew.org; Mon, 28 Mar 2022 10:18:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYpxO-0001vD-VK for qemu-devel@nongnu.org; Mon, 28 Mar 2022 10:02:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:36863) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYpxH-0004kF-7m for qemu-devel@nongnu.org; Mon, 28 Mar 2022 10:02:54 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-28-dWSsC3FGMZOUG2B7TNV5Lg-1; Mon, 28 Mar 2022 10:02:42 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4EAAC100BABE; Mon, 28 Mar 2022 14:02:42 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35AAC1121321; Mon, 28 Mar 2022 14:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648476166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XHu35xixtOXF2QZwH4fi0BxlwmUduhoXGGqYHt4rBM0=; b=GtAW/i8YeB+YTCHhNGDiBUOAnfW0NJoUoy9+fTmSkygCFFWTCCF1W3MQ6O+G8OBk8gGJaU 7rOo3iAWQoqiwMkMt455R+kETdphuL8v9N44a4bPMnH4x79xoP0UmMP0f0DcCyBZD53B9e C8tfcuvUoLQWKK84CueheDVaXMODGeE= X-MC-Unique: dWSsC3FGMZOUG2B7TNV5Lg-1 From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 11/15] tests/tcg: prepare Makefile.prereqs at configure time Date: Mon, 28 Mar 2022 10:02:36 -0400 Message-Id: <20220328140240.40798-12-pbonzini@redhat.com> In-Reply-To: <20220328140240.40798-1-pbonzini@redhat.com> References: <20220328140240.40798-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1648477097199100004 Content-Type: text/plain; charset="utf-8"; x-default="true" List the dependencies of the build-tcg-tests-* and run-tcg-tests-* targets in a Makefile fragment, without going through Makefile.prereqs's "parsing" of config-*.mak. Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 9 ++++++--- tests/tcg/Makefile.prereqs | 18 ------------------ tests/tcg/configure.sh | 11 +++++++++-- 3 files changed, 15 insertions(+), 23 deletions(-) delete mode 100644 tests/tcg/Makefile.prereqs diff --git a/tests/Makefile.include b/tests/Makefile.include index 05c534ea56..b5d0d6bc98 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -39,14 +39,17 @@ SPEED =3D quick # Build up our target list from the filtered list of ninja targets TARGETS=3D$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targe= ts))) =20 +-include tests/tcg/Makefile.prereqs +config-host.mak: $(SRC_PATH)/tests/tcg/configure.sh +tests/tcg/Makefile.prereqs: config-host.mak + # Per guest TCG tests BUILD_TCG_TARGET_RULES=3D$(patsubst %,build-tcg-tests-%, $(TARGETS)) CLEAN_TCG_TARGET_RULES=3D$(patsubst %,clean-tcg-tests-%, $(TARGETS)) RUN_TCG_TARGET_RULES=3D$(patsubst %,run-tcg-tests-%, $(TARGETS)) =20 -# Probe for the Docker Builds needed for each build -$(foreach PROBE_TARGET,$(TARGET_DIRS), \ - $(eval -include $(SRC_PATH)/tests/tcg/Makefile.prereqs)) +$(foreach TARGET,$(TARGETS), \ + $(eval $(BUILD_DIR)/tests/tcg/config-$(TARGET).mak: config-host.ma= k)) =20 $(BUILD_TCG_TARGET_RULES): build-tcg-tests-%: $(if $(CONFIG_PLUGIN),test-p= lugins) $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \ diff --git a/tests/tcg/Makefile.prereqs b/tests/tcg/Makefile.prereqs deleted file mode 100644 index 9a29604a83..0000000000 --- a/tests/tcg/Makefile.prereqs +++ /dev/null @@ -1,18 +0,0 @@ -# -*- Mode: makefile -*- -# -# TCG Compiler Probe -# -# This Makefile fragment is included multiple times in the main make -# script to probe for available compilers. This is used to build up a -# selection of required docker targets before we invoke a sub-make for -# each target. - -DOCKER_IMAGE:=3D - --include $(BUILD_DIR)/tests/tcg/config-$(PROBE_TARGET).mak - -ifneq ($(DOCKER_IMAGE),) -build-tcg-tests-$(PROBE_TARGET): docker-image-$(DOCKER_IMAGE) -endif -$(BUILD_DIR)/tests/tcg/config_$(PROBE_TARGET).mak: config-host.mak -config-host.mak: $(SRC_PATH)/tests/tcg/configure.sh diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index a17db8ce64..991b905354 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -80,6 +80,8 @@ fi : ${cross_as_tricore=3D"tricore-as"} : ${cross_ld_tricore=3D"tricore-ld"} =20 +makefile=3Dtests/tcg/Makefile.prereqs +: > $makefile for target in $target_list; do arch=3D${target%%-*} =20 @@ -226,14 +228,17 @@ for target in $target_list; do echo "target=3D$target" >> $config_target_mak case $target in *-softmmu) - echo "QEMU=3D$PWD/qemu-system-$arch" >> $config_target_mak + qemu=3D"qemu-system-$arch" ;; *) - echo "QEMU=3D$PWD/qemu-$arch" >> $config_target_mak + qemu=3D"qemu-$arch" ;; esac =20 + echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile + eval "target_compiler_cflags=3D\${cross_cc_cflags_$arch}" + echo "QEMU=3D$PWD/$qemu" >> $config_target_mak echo "CROSS_CC_GUEST_CFLAGS=3D$target_compiler_cflags" >> $config_target= _mak =20 got_cross_cc=3Dno @@ -329,6 +334,7 @@ for target in $target_list; do test -n "$container_image"; then for host in $container_hosts; do if test "$host" =3D "$cpu"; then + echo "build-tcg-tests-$target: docker-image-$container_image= " >> $makefile echo "DOCKER_IMAGE=3D$container_image" >> $config_target_mak echo "DOCKER_CROSS_CC_GUEST=3D$container_cross_cc" >> \ $config_target_mak @@ -340,6 +346,7 @@ for target in $target_list; do echo "DOCKER_CROSS_LD_GUEST=3D$container_cross_ld" >> \ $config_target_mak fi + break fi done case $target in --=20 2.31.1