From patchwork Thu Nov 23 15:56:19 2023 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: 746494 Delivered-To: patch@linaro.org Received: by 2002:a5d:6706:0:b0:32d:baff:b0ca with SMTP id o6csp955353wru; Thu, 23 Nov 2023 07:59:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7/nv0dk/rI4BmJYuYO7XmJkMBBfXCjgg1jwP650lyZb10XDn3Ckoi9poBanRUu4cwv4wl X-Received: by 2002:a05:620a:4622:b0:779:d9ee:d35f with SMTP id br34-20020a05620a462200b00779d9eed35fmr6791396qkb.32.1700755197022; Thu, 23 Nov 2023 07:59:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700755197; cv=none; d=google.com; s=arc-20160816; b=rwlxfyFRwb/jCgddH+pf0cYUYUetVJCqeiARpAwRRvd4fE927XTAP6t97nQ7m9fqaz NbdZwyWVaofcMXFCVe/9Sg2b6ONsFAtpMC1tdfS85i1dZucBIIF3BC1uDGmy2SzwsifR rk2XVymiwT9ZwWj4szlcdle5ChePGbo97uqASwW2kW+BIX1U18mc2p0aMeRo5R54dXCf V4K3W3NjA15T3b+lbjlgFXf1UJdAlIHf7kFSawYqIhd47sqcuOj4V9RCRTqwCjfqmK60 eNzDEcP6N1LAXi1wotomhpPxsG9VZmo9jdPt6GNPqz0DjpiUpkGekP6Z1M9NhBuZJ9Ww RQow== 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=zEYzF3Axx2JxZiA2yLlLoGItJkGh2l18cc/hJ925Ej0=; fh=Dz0Qh/UpoeIEiizcnNp9Ig/R6OGoBpw/aNhltryc8Lo=; b=snL9qVdaS9dQDgMHFCblk1Aow7BHvFk3USMUluAmx4VkZTOIOEKpIkeZJVCvMJQK3D 9/TnbpGks4txVP4t41y8vBObCjjNHPNe+KaOwKBIGcKZ9f69GhJivyBSL5HRYgQeDqJE gwnmHQJSU+Z9cqgxGcwK9DOR7pkBsqQM/pBwOJPKNSE8ezXUAwsS4LUdK+vUf78xyHDt iDsmE2VusKmwSvyXZrVzEBHHwRwNpHkObPy49YFPYmrg27BSTdg8cMV1CnO/mYMS93js FFOKQSA8rgwmSfGVQFJ6opOnUiGkr7WJO0hSTWg1aK3N6XAjOndFn85Zuk/mSOt3xx1b gIsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OZvuBqWO; 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 f17-20020a05620a409100b00773fe581c0dsi1308581qko.398.2023.11.23.07.59.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Nov 2023 07:59:57 -0800 (PST) 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=OZvuBqWO; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6C4G-00063Y-Tc; Thu, 23 Nov 2023 10:56:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6C4F-00062s-6u for qemu-devel@nongnu.org; Thu, 23 Nov 2023 10:56:39 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r6C4A-0002PQ-SJ for qemu-devel@nongnu.org; Thu, 23 Nov 2023 10:56:38 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40b36e31b57so5263105e9.3 for ; Thu, 23 Nov 2023 07:56:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700754993; x=1701359793; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zEYzF3Axx2JxZiA2yLlLoGItJkGh2l18cc/hJ925Ej0=; b=OZvuBqWOyRjOI6EpUgbY0lbP+P3TtyvYF2kA5llNiiQuqE1k3hFBlmxKUcNGnPEciX DdJ33zweWAFI9uK7Q8T3oTpg6Cu93oUNR0gFe5zyQ82D+lK+0seUckiuFmoGwRFp6iLo H8ZWL23BEK1DrvCgFRirxubLW6E7CGa6uoGD3Fp3Knf24Vj4quKczOfXmMX+KXIsiZPG FUI4tYNLlhTdtE4p8+94chp7UhgqCITaP9lxtO7m9yStjpZOrB3JxKc0lq+IuoiKfvmX VGB3F45u/Y7CHPFtokuPxEIMlJApqWR83yoQU5sI91XtTCFHuW+arhiPtQOTvLC52JLS 26dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700754993; x=1701359793; 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:message-id:reply-to; bh=zEYzF3Axx2JxZiA2yLlLoGItJkGh2l18cc/hJ925Ej0=; b=kTevGZcurjNuPLZl92rCiZiRl2wnMCsTErqQiuMQNmUI9AZPHPejiVzSQW/lWnrfZ4 jMxpz05+r9VYZmrslaauquCwBZm8Mkz+QcIOLRGfMziUwvEAcOO7MUdJ5j84WAth+xW9 bV0HXKTXFXaDi1ssTGSlsxbrV2eki8DKXDkFreC/HDOG3NaddPafzCJRX4Xswp1mCPka 1Xff52XgqZZlF1spSL9aWYEl8/gFM3xVpYWFRwBtVGOMLW31PyBYkAeUtPF6Nlm5mcs4 /dbJj2b0Kav0UcMRrpjgXhQovbLTFeqqHbskTREncazPo0HT+QZJfmuMHHM2grjKupTD 318g== X-Gm-Message-State: AOJu0YzFzGde92fGljM7vT1cRgtmXJrGr82p+mgP0pK2PabvmW9wQs6h 7n+OVIui8LKriQMlojLQRUXfqHc8zzWUqkLZZjmQIA== X-Received: by 2002:a05:600c:3110:b0:404:7670:90b8 with SMTP id g16-20020a05600c311000b00404767090b8mr24545wmo.27.1700754993526; Thu, 23 Nov 2023 07:56:33 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id u12-20020a05600c138c00b004063c9f68f2sm2409162wmf.26.2023.11.23.07.56.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 07:56:30 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C8C5F645F6; Thu, 23 Nov 2023 15:56:21 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Thomas Huth Subject: [PULL 13/14] configure: don't try a "native" cross for linux-user Date: Thu, 23 Nov 2023 15:56:19 +0000 Message-Id: <20231123155620.3042891-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231123155620.3042891-1-alex.bennee@linaro.org> References: <20231123155620.3042891-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org As 32 bit x86 become rarer we are starting to run into problems with search paths. Although we switched to a Debian container we still favour the native CC on a Bookworm host. As a result we have a broken cross compile setup which then fails to build with: BUILD i386-linux-user guest-tests In file included from /usr/include/linux/stat.h:5, from /usr/include/bits/statx.h:31, from /usr/include/sys/stat.h:465, from /home/alex/lsrc/qemu.git/tests/tcg/multiarch/linux/linux-test.c:28: /usr/include/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory 5 | #include | ^~~~~~~~~~~~~ compilation terminated. make[1]: *** [Makefile:119: linux-test] Error 1 make: *** [/home/alex/lsrc/qemu.git/tests/Makefile.include:50: build-tcg-tests-i386-linux-user] Error 2 This is likely to affect more and more linux-user builds so wrap the whole check in a test for softmmu targets (aka bare metal) which don't worry about such header niceties. This allows us to keep using the host compiler for softmmu tests and the roms. Signed-off-by: Alex Bennée Message-Id: <20231120150833.2552739-14-alex.bennee@linaro.org> diff --git a/configure b/configure index 9ea0bf5698..42fe4d0510 100755 --- a/configure +++ b/configure @@ -1391,16 +1391,19 @@ probe_target_compiler() { done try=cross - case "$target_arch:$cpu" in - aarch64_be:aarch64 | \ - armeb:arm | \ - i386:x86_64 | \ - mips*:mips64 | \ - ppc*:ppc64 | \ - sparc:sparc64 | \ - "$cpu:$cpu") - try='native cross' ;; - esac + # For softmmu/roms we might be able to use the host compiler + if [ "${1%softmmu}" != "$1" ]; then + case "$target_arch:$cpu" in + aarch64_be:aarch64 | \ + armeb:arm | \ + i386:x86_64 | \ + mips*:mips64 | \ + ppc*:ppc64 | \ + sparc:sparc64 | \ + "$cpu:$cpu") + try='native cross' ;; + esac + fi eval "target_cflags=\${cross_cc_cflags_$target_arch}" for thistry in $try; do case $thistry in