From patchwork Mon Apr 19 14:54:21 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: 424004 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2795460jaf; Mon, 19 Apr 2021 08:01:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrihD2rA4KWYA32C2/ETqJDrRugsSeM6ljDpMylwIpYuwVqvD7zx70BLUyRj4lKKXc07WS X-Received: by 2002:a5e:9316:: with SMTP id k22mr14669163iom.160.1618844468170; Mon, 19 Apr 2021 08:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844468; cv=none; d=google.com; s=arc-20160816; b=0i1P1BYfiEnadBEAAqhAuKcKMYf2Il58zbRjYAjAR0tUHOQmhsQ9EVMfM33KDkx5cX finLKQb6YTULnEKUmDEuevX2UH+6xjgGCeC6mkhBsz3of1D10CpubA+TnE06JKtIuWhI HQT/ZEleh6n6uCj4OOXCqmcGzrjKT2O+zzkFyC6S/BYUJzd+7RPPxunW43PLXxEY02HF lPxOWRR+6VSLiEGt/hmLkemZo2+ztKxPdnZT+Bss1XcoMCYBE8VrqfcePuVJ6vn3xMpZ h2o7YpauJe9TFK5JLqq4hplTX5XVyKjMUaMJm5LCsFa6Rc9Et5L5OTUVr3RFdNbk2b9M HNkA== 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=iizzfPGhkn8lyZo+/wpl/UTbuqCuTImLvD1b5kAGalE=; b=Hd2AqIP1M9tXeVN8STixSbi7jhX8MXVM3nivxgdIjwZ2wWFo2L4ixk87YOApCNun/G EcpqCKNu1ssLvkvHQxz62IGHYpBxtbuITB+f24uO8SrHQ+rfGs1Db1YJYURkbUp0Kuud wPNFIYoIgA8ivrzrEC+dgUZO4+ccu6NWEE8gamOsaH4+jceiEDNTE5lEdc1HnnvKGjxK ATjjwtlKcNLckNkoi9UiCTFIGxhPAakDoAqlTlKNWZqKazG49ev+31x+0+fbAm84yPMT 9U1z7Ugz3pEo7bGJZLgV666qk8zGmQZ58m0rNIg0dO9BVmq0jN0zITnEcUaZPJLv+oRr wciQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YUZww236; 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 l1si15488126jaj.50.2021.04.19.08.01.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:01:08 -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=YUZww236; 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]:37948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVOd-0001ae-D4 for patch@linaro.org; Mon, 19 Apr 2021 11:01:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVId-0003Ur-5V for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:55 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:42593) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIa-00070B-Nb for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:54 -0400 Received: by mail-wm1-x333.google.com with SMTP id y5-20020a05600c3645b0290132b13aaa3bso6496189wmq.1 for ; Mon, 19 Apr 2021 07:54: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=iizzfPGhkn8lyZo+/wpl/UTbuqCuTImLvD1b5kAGalE=; b=YUZww2364DApKUBOOFecZAlH3Cjw0njXUMJB/SSvPzE+crGVZ1JzpBkcv0NC9H/5Jj u+b+9tw4yH7BDB1cSFhbLwfYY30aAMduALfJdpcfPZr8m6UQdoUf0urf2vO8yuU+IokW tooPV0yY3XHdTgywrbl/D6gZg6rhUZsGzANMeOD+k9iEwyxcK50RGkmddNk1HzO6wShs Jrpsp1yp7mVU4bO6ohT/RKuJGsWfSiu2lPBHql95w8wIxjej4SgGy2ttShLw+jUDGmww n+bvOhCi4jdvvpmbEErIfxvc4E9CUHBftx9+icXhlwtIA9JNaatELaWzTIMzrq3DAUyo vnVA== 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=iizzfPGhkn8lyZo+/wpl/UTbuqCuTImLvD1b5kAGalE=; b=YQ59wmSwAjKuukjxnx7HaGcspgZI1EhfQlxueWPKbedjP/sQpxAiF4QFmKWJK8+ft+ yCmIcg9CjngEShfwjA5xeYeCUOBAPLlacMfctln5BHyaUYtoQACaTRgN8Uw2kCghXTtQ yx4CKwBIMX3cKzFdyvvGrbj9OqbBjKilKsBwxOSglpdZufJfg3dcVCKEvdQi2n65BLCf pxy0Ytr6RPCBjHcgYWfNUt3ym5oWAO+6t3jW3v1/pDmi5pb7ryiwQ7qnlo/nOBgO01PK IC929rK2fyZTB7kJqoQDI1LTXnYzZh290M9QepEwSKtFiysOfqQq80CYQXYUxwBOh9iw Itbg== X-Gm-Message-State: AOAM530ICS0UylD61Mr7rtEkbLe7qKidKDuYxrGZZwyRFknO8d7HpB+X lxoHW5uuNMAlcDnWyr0fJRVPSQ== X-Received: by 2002:a1c:1dd0:: with SMTP id d199mr21577263wmd.54.1618844091428; Mon, 19 Apr 2021 07:54:51 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 186sm20132107wme.10.2021.04.19.07.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A41E21FF9A; Mon, 19 Apr 2021 15:54:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 11/25] tests/tcg: Add docker_as and docker_ld cmds Date: Mon, 19 Apr 2021 15:54:21 +0100 Message-Id: <20210419145435.14083-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.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, Bastian Koppelmann , 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: Bastian Koppelmann At least for the TriCore target no easily available c compiler exists. Thus we need to rely on "as" and "ld". This allows us to run them through the docker image. We don't test the generation capabilities of docker images as they are assumed to work. Signed-off-by: Bastian Koppelmann [AJB: fix quoting, only handle docker & clear, test -n, tweak commit msg] Signed-off-by: Alex Bennée --- tests/tcg/Makefile.qemu | 15 +++++++++++++++ tests/tcg/configure.sh | 17 ++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/tests/tcg/Makefile.qemu b/tests/tcg/Makefile.qemu index a56564660c..2c4617516b 100644 --- a/tests/tcg/Makefile.qemu +++ b/tests/tcg/Makefile.qemu @@ -22,6 +22,8 @@ quiet-@ = $(if $(V),,@) quiet-command = $(quiet-@)$(call quiet-command-run,$1,$2,$3) CROSS_CC_GUEST:= +CROSS_AS_GUEST:= +CROSS_LD_GUEST:= DOCKER_IMAGE:= -include tests/tcg/config-$(TARGET).mak @@ -42,6 +44,7 @@ cross-build-guest-tests: $(call quiet-command, \ (mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \ $(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC="$(CROSS_CC_GUEST)" \ + AS="$(CROSS_AS_GUEST)" LD="$(CROSS_LD_GUEST)" \ SRC_PATH="$(SRC_PATH)" BUILD_STATIC=$(CROSS_CC_GUEST_STATIC) \ EXTRA_CFLAGS="$(CROSS_CC_GUEST_CFLAGS)"), \ "BUILD","$(TARGET) guest-tests with $(CROSS_CC_GUEST)") @@ -59,11 +62,23 @@ DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc \ -i qemu/$(DOCKER_IMAGE) \ -s $(SRC_PATH) -- " +DOCKER_AS_CMD="$(DOCKER_SCRIPT) cc \ + --cc $(DOCKER_CROSS_AS_GUEST) \ + -i qemu/$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- " + +DOCKER_LD_CMD="$(DOCKER_SCRIPT) cc \ + --cc $(DOCKER_CROSS_LD_GUEST) \ + -i qemu/$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- " + + .PHONY: docker-build-guest-tests docker-build-guest-tests: docker-image-$(DOCKER_IMAGE) $(call quiet-command, \ (mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \ $(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC=$(DOCKER_COMPILE_CMD) \ + AS=$(DOCKER_AS_CMD) LD=$(DOCKER_LD_CMD) \ SRC_PATH="$(SRC_PATH)" BUILD_STATIC=y \ EXTRA_CFLAGS="$(CROSS_CC_GUEST_CFLAGS)"), \ "BUILD","$(TARGET) guest-tests with docker qemu/$(DOCKER_IMAGE)") diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index bfe9619217..9f304b6c5a 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -75,7 +75,13 @@ fi for target in $target_list; do arch=${target%%-*} + # reset all container fields container_image= + container_hosts= + container_cross_cc= + container_cross_as= + container_cross_ld= + case $target in aarch64-*) # We don't have any bigendian build tools so we only use this for AArch64 @@ -272,7 +278,16 @@ for target in $target_list; do for host in $container_hosts; do if test "$host" = "$ARCH"; then echo "DOCKER_IMAGE=$container_image" >> $config_target_mak - echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak + echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> \ + $config_target_mak + if test -n "$container_cross_as"; then + echo "DOCKER_CROSS_AS_GUEST=$container_cross_as" >> \ + $config_target_mak + fi + if test -n "$container_cross_ld"; then + echo "DOCKER_CROSS_LD_GUEST=$container_cross_ld" >> \ + $config_target_mak + fi fi done fi