From patchwork Tue Apr 19 09:10:10 2022 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: 563330 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3120788map; Tue, 19 Apr 2022 03:04:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpse0AUZGri0MZOQyj/uL0Cn3bts6G//ozCE9e1UHxEI2JYLajbpEYyOex098cLxEBjTY8 X-Received: by 2002:a05:622a:6115:b0:2f1:d8fa:84aa with SMTP id hg21-20020a05622a611500b002f1d8fa84aamr10130956qtb.689.1650362663281; Tue, 19 Apr 2022 03:04:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650362663; cv=none; d=google.com; s=arc-20160816; b=FIYsr9IyrhstFIzzLSd6lw5qkWHoWo50kgCM/De/WJus4UY7AngDUkXT4H0egbhrbD Xq3aHegXMDme15z1UrB68mMuR2+Hk5vsI+lcCwDytH3sRRxKy3nFlQINHTPSU1UrhP0X 4AnPpsB6evsyaH2g4u0AHmf2IZtEYTc2DVi0uJ5MlhIRLaJnDVVLez1732idhxcAIc00 9PsHoyUxIeraKy89fNE+LFnvfU8v1cO9ioxkWdq7UsBVP+4faF6fK+MSmjorzM5x2oWP h3RR4X0/kOuZPzae9ysRqLQsJIJgNDDbVfpV7FXDuL2PlZ6V9ucPKrYX5awsRqq7ZfBD 7ZrQ== 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=18HVvyVsxNNT4szZrpdgPZelaQsmL8IAzeUGHiqEhUQ=; b=TTBEWZz7extonALG4rq3f38i3HqjYkinTfVHumdT7NyRBVkXh5kJI6snRwCoeIgzPe izlJKQZQoypnE7F7jsDDjoUr7ezf1V2yUGfW1Vf4i9jHEd94mkd7CtfrGt15gNONKSfJ yHbB0hgHUSUdplNPwhDzwyo8NO/qfpX1op/rr2Zvfi2fKQlSa3SZJtQbpoXCX/51Q64a PxSFKhZLwSVxPpo2MIlPCIDkeGn+PfCb/DFUC/hgzhHGMZXieRfrSLp1KRU9RQif0TG0 0FPUxPbC2hVpw9imdMIZJsO4LGqnuHMdwzSVfNoZMimG7o4sRgVnHFXIokXuAin0PeIq KoeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dP85BJp2; 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 t18-20020a05622a149200b002f1f0a55d84si3519859qtx.452.2022.04.19.03.04.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Apr 2022 03:04:23 -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=dP85BJp2; 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]:44566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngkiV-00086n-ML for patch@linaro.org; Tue, 19 Apr 2022 06:04:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngk1a-0007RV-6o for qemu-devel@nongnu.org; Tue, 19 Apr 2022 05:19:54 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:46030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ngk1Y-0001Px-Dz for qemu-devel@nongnu.org; Tue, 19 Apr 2022 05:19:53 -0400 Received: by mail-ed1-x52b.google.com with SMTP id v15so20381589edb.12 for ; Tue, 19 Apr 2022 02:19:52 -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=18HVvyVsxNNT4szZrpdgPZelaQsmL8IAzeUGHiqEhUQ=; b=dP85BJp27MK406dy+hsJcWapn9M2rBMQnkuEXnMMuIElFXsdB7LsXxiLUoj/oUWfwd /E5HylllGq+6ppJU4riikg8AH4MsxBdy5Q3LkC33zOiiW/GRxorjkka+9NxTpErwIL3/ ujRsH+B3uDsKdYGq9jttPaOYsSqZfaWSkcBlTdv2KCrc+1B6ur6v0kZUCIVbBPFrVnSD vDu8AECFTeXTjQESJV+L7K3wGP1TLp6v5+WKOm/mRJTuB7psXc7/0CbSUSqadAiMU4Dz RgrUKnDCgRsFsMuJV1DYaGIzdf5XZJTkTi9SPMRj9mXbEVygt9mThdXBh2lle/I0Y0O+ zAZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=18HVvyVsxNNT4szZrpdgPZelaQsmL8IAzeUGHiqEhUQ=; b=x9HsblvEt6KdzVigPkXHJ3RCGPmZ1tnjENG/l5JJdTOERDfi3/AV2MnZ8GD03hZe0p sY4eC+lxSSnT6WeyLUD3kiKHNLkvvsc0W/tKmuf03kqyJXlhULkgQY1ODEk/Q+UJs398 02czHi+EWfidCZYVZiQ7NDyAZkmocVE/bCqJen1sMTOVyYzKcTZ0EF9TMTiCjfU85FFn 7QFELmKDVMLgTJLKCZPk35ko0mgJ7hsh8Bb+Ys91yErwPms20sSzyDk8kmjIBSOeI0LN LT0DkU9v11YvlPGfSyh/VvkFsSKsOwdK4IkYzNOi/6O8GSev9CsJ1fxAOBmVdI1ls0t5 sRYg== X-Gm-Message-State: AOAM532WrLA25j21TFlLji9zDHxGjVVSFG0R8pl4xuhU6KOkXvxZPVIi LqGCUidaatKiUWIwrQRFqt3FrQ== X-Received: by 2002:a05:6402:1941:b0:413:2b7e:676e with SMTP id f1-20020a056402194100b004132b7e676emr16809600edz.114.1650359991056; Tue, 19 Apr 2022 02:19:51 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q7-20020aa7cc07000000b00423ded189aesm3467454edt.13.2022.04.19.02.19.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 02:19:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A61D11FFC7; Tue, 19 Apr 2022 10:10:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 15/25] tests/tcg: prepare Makefile.prereqs at configure time Date: Tue, 19 Apr 2022 10:10:10 +0100 Message-Id: <20220419091020.3008144-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220419091020.3008144-1-alex.bennee@linaro.org> References: <20220419091020.3008144-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52b.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, 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: 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" From: Paolo Bonzini 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 Message-Id: <20220401141326.1244422-13-pbonzini@redhat.com> Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- tests/Makefile.include | 9 ++++++--- tests/tcg/Makefile.prereqs | 18 ------------------ tests/tcg/configure.sh | 10 ++++++++-- 3 files changed, 14 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 = quick # Build up our target list from the filtered list of ninja targets TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targets))) +-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=$(patsubst %,build-tcg-tests-%, $(TARGETS)) CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TARGETS)) RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGETS)) -# 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.mak)) $(BUILD_TCG_TARGET_RULES): build-tcg-tests-%: $(if $(CONFIG_PLUGIN),test-plugins) $(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:= - --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 0d864c24fc..904c351029 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -80,6 +80,8 @@ fi : ${cross_as_tricore="tricore-as"} : ${cross_ld_tricore="tricore-ld"} +makefile=tests/tcg/Makefile.prereqs +: > $makefile for target in $target_list; do arch=${target%%-*} @@ -226,14 +228,17 @@ for target in $target_list; do echo "target=$target" >> $config_target_mak case $target in *-softmmu) - echo "QEMU=$PWD/qemu-system-$arch" >> $config_target_mak + qemu="qemu-system-$arch" ;; *-linux-user|*-bsd-user) - echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak + qemu="qemu-$arch" ;; esac + echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile + eval "target_compiler_cflags=\${cross_cc_cflags_$arch}" + echo "QEMU=$PWD/$qemu" >> $config_target_mak echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak got_cross_cc=no @@ -329,6 +334,7 @@ for target in $target_list; do test -n "$container_image"; then for host in $container_hosts; do if test "$host" = "$cpu"; then + echo "build-tcg-tests-$target: docker-image-$container_image" >> $makefile echo "DOCKER_IMAGE=$container_image" >> $config_target_mak echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> \ $config_target_mak