From patchwork Thu Sep 29 11:42:08 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: 610587 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp880841pvb; Thu, 29 Sep 2022 06:10:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5WKbQnuAo+WawxdcUV8so0SojLiQICIT0ZW1CIi/5W3gbiwDf+lDHUHcNmDi+joHO3rl+4 X-Received: by 2002:a0c:8dc9:0:b0:473:14fe:7c4e with SMTP id u9-20020a0c8dc9000000b0047314fe7c4emr2284145qvb.44.1664457057449; Thu, 29 Sep 2022 06:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664457057; cv=none; d=google.com; s=arc-20160816; b=lIs28A98yYTwzjtoYK825dMIq6XPCn/W7gm8XJukyX67Mw0d2WmE7B/UEVXUZwygib H/t3u+gQMcnUSNJhnzIUsqgwgXc7KE0J1RNYUmAlh6yHLJym9xLHhGufuhSGyMiOwbpi Mc8/pANl8OlW2dU4mkfdotF5Ymq7dA6YJ9kwaMmW/lDXG3bvCcI+GGPtKaXlsGeqIbaM wqY42wSGa5Jog8+DzF7EYHtyPZTMjvQDjhVeQWK0M6vCAWbUn5lNqCSTDpRap+TDeSvF tiw5hQ4qrqaQDYSR9U9tZ+3BilRCQ6Ix2cm9+k8RhkWkh0WQoAuwAjaylcBDqSyXkJbi KsMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=KtKYefRpdBrq386zGzvYj2i6PNAoiGDyuMR12lnFx6w=; b=CQJsvrwiwWFj0zdPJBye/F6+Eeia4cYF6Qx6sIP/+/PT4ZQWTfrdURI9XVxD48zMx3 oouYaHpYVlsXx9sHYN2tMpNYPNgEFOGL13DyuaOamCCcVJXcQNkvheEmMtZZrz26jFD7 46wid8RzkzLDDBIZJnb/vjOYli6spUxNWJgMyTZB6q6Cgsxx7m7xV2SftAB6CZAZLIu7 phgdprPE2iU4qCUClQl08UniBBk1laKKIvwOHrTDHy2MBw1ktEjoEEoHpzapMRP9AaUz xZWaFFjwl7U6Fk9CcRUelOEESuNUqE+/IMgHqlGqdmJUWakZChU5ZcTzuQctx0nmwvtP cfcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rqrAGRWw; 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=pass (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 fz25-20020a05622a5a9900b0035d44310ba1si1276699qtb.569.2022.09.29.06.10.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Sep 2022 06:10:57 -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=pass header.i=@linaro.org header.s=google header.b=rqrAGRWw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odtJY-0005A6-KI for patch@linaro.org; Thu, 29 Sep 2022 09:10:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odrwF-0004ch-QV for qemu-devel@nongnu.org; Thu, 29 Sep 2022 07:42:51 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:34769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odrwE-0001GL-2A for qemu-devel@nongnu.org; Thu, 29 Sep 2022 07:42:47 -0400 Received: by mail-wr1-x42b.google.com with SMTP id x15so1259278wrv.1 for ; Thu, 29 Sep 2022 04:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=KtKYefRpdBrq386zGzvYj2i6PNAoiGDyuMR12lnFx6w=; b=rqrAGRWwh798cQ4UG9G57MXEytMZg00x2Lmlz2ITSanRZ8BSCzlhmFrjdPTHwVqO87 nJO1lOwcDFv0kzZ0x3RhXKEeotpkNmBZQsifaNZF1YVg4TwsJNioiqNDDyDvaD7pKHss 2IiFJFSbO5slV0aAgsZsqfyLQ3rCkdZT9TdDrRlTMa8BtPnNouxDUGjYspLuZ3ea5A16 MreKPo/EKnHlj1/58HLdpdtR/ZWNjMDwbdM9r2iywgrmgDET58Vw9ZqQuMgSqjfjiysN u10iWM5IEZv9bJDtg07uYrGTaoj+n4Uh+2JxilJIYyrO79ypl59rf7ptetfUM+BeTJhK d7Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=KtKYefRpdBrq386zGzvYj2i6PNAoiGDyuMR12lnFx6w=; b=eqHI5U+8zkt9eNFmRv8uEymUFU8cGfml3nuIo0rJsOGxA2OAAyplalURDoq8Gp7KKg f0MJWlfMG+nQZYxLx/FOyBQynGTD8oBwl+jYVOQEv/8TDOPsSY2N9QqATK3YtK2RWvP6 h2KEW7RboK5oIu6XdVo445XL5TxBPaiZcsSYpB4ZG3Inl/sNmNnGS1chuIRSKWT//Vxw ZW8JOfOZt8nkwkcLEx8mDWaNE2v8DRgc/YO6xM7U0sUOgZPlty3xYi8la4WpoFt1nzrE wnzH6ZXVMtuXNLno4mTed369ovt6gfh4DxoSa6gfIC20avc6hiFwOaoBD9NuU70PP3B4 lFHg== X-Gm-Message-State: ACrzQf0AGRmJsqJKrhDvsHNW1BXuw3b2Nz/yXRqHeAHfaHQNytJ64mCJ vFDb70UadWRiYgag5jLj7I85ww== X-Received: by 2002:adf:d84e:0:b0:22c:ce81:7c26 with SMTP id k14-20020adfd84e000000b0022cce817c26mr1840729wrl.463.1664451764786; Thu, 29 Sep 2022 04:42:44 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id w10-20020a05600c474a00b003b4ac05a8a4sm5509180wmo.27.2022.09.29.04.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 04:42:41 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7F61F1FFD0; Thu, 29 Sep 2022 12:42:34 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, minyihh@uci.edu, ma.mandourr@gmail.com, Luke.Craig@ll.mit.edu, cota@braap.org, aaron@os.amperecomputing.com, kuhn.chenqun@huawei.com, robhenry@microsoft.com, mahmoudabdalghany@outlook.com, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v1 28/51] configure: build ROMs with container-based cross compilers Date: Thu, 29 Sep 2022 12:42:08 +0100 Message-Id: <20220929114231.583801-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220929114231.583801-1-alex.bennee@linaro.org> References: <20220929114231.583801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini s390-ccw remains a bit more complex, because the -march=z900 test is done only for the native cross compiler. Otherwise, all that is needed is to pass the (now mandatory) target argument to write_target_makefile. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée --- configure | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/configure b/configure index c175650eb9..a54e17aca9 100755 --- a/configure +++ b/configure @@ -2152,7 +2152,7 @@ probe_target_compiler() { target_ranlib= target_strip= fi - test -n "$target_cc" + test -n "$target_cc" || test -n "$container_image" } write_target_makefile() { @@ -2307,7 +2307,7 @@ if test "$targetos" != "darwin" && test "$targetos" != "sunos" && \ config_mak=pc-bios/optionrom/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "TOPSRC_DIR=$source_path" >> $config_mak - write_target_makefile >> $config_mak + write_target_makefile pc-bios/optionrom/all >> $config_mak fi if test "$softmmu" = yes && probe_target_compiler ppc-softmmu; then @@ -2315,25 +2315,31 @@ if test "$softmmu" = yes && probe_target_compiler ppc-softmmu; then config_mak=pc-bios/vof/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_DIR=$source_path/pc-bios/vof" >> $config_mak - write_target_makefile >> $config_mak + write_target_makefile pc-bios/vof/all >> $config_mak fi # Only build s390-ccw bios if the compiler has -march=z900 or -march=z10 # (which is the lowest architecture level that Clang supports) if test "$softmmu" = yes && probe_target_compiler s390x-softmmu; then - write_c_skeleton - do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC - has_z900=$? - if [ $has_z900 = 0 ] || do_compiler "$target_cc" $target_cc_cflags -march=z10 -msoft-float -Werror -o $TMPO -c $TMPC; then - if [ $has_z900 != 0 ]; then - echo "WARNING: Your compiler does not support the z900!" - echo " The s390-ccw bios will only work with guest CPUs >= z10." + got_cross_cc=no + if test -n "$target_cc"; then + write_c_skeleton + do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC + has_z900=$? + if [ $has_z900 = 0 ] || do_compiler "$target_cc" $target_cc_cflags -march=z10 -msoft-float -Werror -o $TMPO -c $TMPC; then + if [ $has_z900 != 0 ]; then + echo "WARNING: Your compiler does not support the z900!" + echo " The s390-ccw bios will only work with guest CPUs >= z10." + fi + got_cross_cc=yes fi + fi + if test "$got_cross_cc" = yes || test -n "$container_image"; then roms="$roms pc-bios/s390-ccw" config_mak=pc-bios/s390-ccw/config-host.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak - write_target_makefile >> $config_mak + write_target_makefile pc-bios/s390-ccw/all >> $config_mak # SLOF is required for building the s390-ccw firmware on s390x, # since it is using the libnet code from SLOF for network booting. git_submodules="${git_submodules} roms/SLOF" @@ -2554,7 +2560,7 @@ for target in $target_list; do ;; esac - if probe_target_compiler $target || test -n "$container_image"; then + if probe_target_compiler $target; then test -n "$container_image" && build_static=y mkdir -p "tests/tcg/$target" config_target_mak=tests/tcg/$target/config-target.mak