From patchwork Fri Aug 30 10:16:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 823964 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c1:0:b0:367:895a:4699 with SMTP id p1csp700813wrs; Fri, 30 Aug 2024 03:17:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXljPZbeXVab1PaTgXWwd121G6wpWIqoSetn2HIn6qP86gjOAvHcKoHMeMQXaGEMtf6efjWiQ==@linaro.org X-Google-Smtp-Source: AGHT+IHF2HDXayYmfbMuQtgCyNPxz6PT3Ln91C0DiXx+OHhjjDxM+oK/Qlh+H5j3v9SfD4l09Qvo X-Received: by 2002:a05:6512:b2a:b0:52e:fa5f:b6b1 with SMTP id 2adb3069b0e04-53546bcb1d4mr827680e87.60.1725013069800; Fri, 30 Aug 2024 03:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725013069; cv=none; d=google.com; s=arc-20240605; b=crE/Yhw01kUK6WuLZqtIAmzlolrAiQzhtTCWrypiUHwTvEl30cketuQ78PhsAuSKVm kvzBtQi1YHGayAW6nj6AYiM7Wrr2M7CQWZeMBIOHAzRtsBGgiPSnZBUSy2gL31Qj3mix uJN7/Oj9dxU/aRgYPE/qwlX+3zg6mxLYQq9kWAhu2JMDeiaNjPTulHTdikdz8v5ADSWj msZFVexH0fGbyCed795evw1g2/TOSjxUwvF/v+cVyXA3FoOQRdhoPmU7C4+Sl9WEsnEB PVPNCsgX+cB3eXw+QFyDBTqAMF4T2lqPmWYmBOD7slXYvnaM9f/FAu3Rsj5V6DWu0vac i8Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=UDVq0/Zv29LqDL7LOh8KnfZqyATDPB5jWwnrFqrVuyw=; fh=VCASqRBh3Wt8k5Tbv0KuGn5fWi/qebVQ8C+cOHVYZcQ=; b=J/X83Ll1+aRJqRKupwWSXh1a/CohnMA2Bblw9FrHsP8XAfhH0k6HYZIbhUf3oXyak4 xkjjJVgcS1JGte59Q8/B3aoYYP2rKKSc4kZ0n0xxpmzljbc6e4ByBkLKIyTgLHGyecBI PSxxw6Bbm5pex1gTys59um3HbTvzmUET2Q+5GW+Iu1NqNikyrn/Qvz3zjgDGx+rRyVoq Ydq1wj489z6YxEi+dvDLbPW3ev49qyMt4vAwhhEKl0vUNTQSrcz/wanggWI5AccrhfYp sQHbcfBbkFfs3NwcQtvM1upy1qSJRWZFRABg0ChmbCVzu5DpvAXpVxwJWuR+TArq5aVM +deg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MrTskOai; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-a89891fcbbfsi275196366b.1050.2024.08.30.03.17.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 03:17:49 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MrTskOai; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 95BFD889FD; Fri, 30 Aug 2024 12:17:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="MrTskOai"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BC6A5888CC; Fri, 30 Aug 2024 12:17:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A77A0887F3 for ; Fri, 30 Aug 2024 12:17:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-374b686d62dso129414f8f.1 for ; Fri, 30 Aug 2024 03:17:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725013043; x=1725617843; darn=lists.denx.de; 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=UDVq0/Zv29LqDL7LOh8KnfZqyATDPB5jWwnrFqrVuyw=; b=MrTskOaijQxftI9n8H26fhnCTHZxQ/s4fq+CEydRfo4dCyUkv1vHA/DVII9GMsgat7 ramTlFelyja9dsbjajQYEFYUVO1245WBT0TBHt+QdExLemKFUkMufGC/xKkqUj2MUCCH 4JJLMRevS3u3SOQkqeXR+FyHLRePuIBYD1qvuICy/sMkFjsnQFnjDVlj6wyAyR6hp9Xa LLfr5m8Kz5j8of3H2wPp+CcgMSJGuZCY45N2TyfhJl3b6ZznX1TkdPlV14vKVKNygCfr cZPHttj5jaqvFIWrzhrdyZO6DBWpCQ7Vr7mLXiC76jpXzQuss0MMhod9qrfmxzP6kuLQ O86A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725013043; x=1725617843; 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=UDVq0/Zv29LqDL7LOh8KnfZqyATDPB5jWwnrFqrVuyw=; b=oEu9dF/uDzI3fC3rt4PHREcd3atOjveDpflM7hYXR4DMvGVAVyXpt5WaMvUzp8lxhm t0Ys1WO4sc+dWGDgFqkE+I+/GGqV4xSmEEifnBOa+W12zyXI9YWag9a5yAQX6xbMOHWa yX6kienVHxstr3+yud70eGA+kuS8YZEkgOC4B5bOSzqan3ZAdpo820Mc1t5Pj5U4BQuv 2flj5ba6zh1q1cxViUvmxXOLuXZpR/nN5EsXgK4HKBqxPbiggnGbEXbdR+qWzC/Yj6Hy 5kDRFXF/acghk9YpcVVJ+BWOHq+Q06eJt4Kc+on+UVtY39Ro7cFMa5MWDqBYUen6158J dCYA== X-Gm-Message-State: AOJu0YzVZVz8wh1gPdNOCwVfsposXK2VAwHwjOnxiC81XGJQiAfczcjy U/jrIsAV+t2jR4D61d78wlNkU15a9MgEX66Ut4ZdsEwg5qEhGNaVsND6cWAl5WIvDKBOYyexD72 7PJm6aQ== X-Received: by 2002:adf:f84d:0:b0:374:b9d7:5120 with SMTP id ffacd0b85a97d-374b9d756a9mr49427f8f.23.1725013042598; Fri, 30 Aug 2024 03:17:22 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:6417:8cf6:a7f7:ee38]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-374b6a3d27fsm472728f8f.59.2024.08.30.03.17.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 03:17:22 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Peter Robinson , Jerome Forissier , Simon Glass , Tom Rini , Andrejs Cainikovs Subject: [PATCH v2 02/16] buildman/toolchain.py: set CROSS_COMPILE only if self.cross is set Date: Fri, 30 Aug 2024 12:16:45 +0200 Message-Id: <655de02f937e3ea3a8f5306ef510d817bee8065b.1725012294.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean In MakeEnvironment(), CROSS_COMPILE is defined to be self.cross (with or without a full path), optionally prefixed by the toolchain wrapper defined in ~/.buildman. This is fine when self.cross is not empty, but it doesn't make sense when it is: - Either there is no wrapper and we end up with an empty CROSS_COMPILE which is the same as not defining it (the host compiler will be used), - Or there is a wrapper and CROSS_COMPILE will contain only the wrapper which obviously is not a valid compiler, hence an error. Test case: $ sudo apt install ccache $ grep -q toolchain-wrapper ~/.buildman || \ printf "[toolchain-wrapper]\nwrapper = ccache\n" >>~/.buildman $ make mrproper $ ./tools/buildman/buildman sandbox_noinst $ ./tools/buildman/buildman sandbox_noinst Building current source for 1 boards (1 thread, 24 jobs per thread) sandbox: + sandbox_noinst +In file included from boot/bootmeth_efi.c:16: +include/efi_default_filename.h:20:15: error: operator '==' has no left operand + 20 | #if HOST_ARCH == HOST_ARCH_X86_64 + | ^~ [...] Signed-off-by: Jerome Forissier Reviewed-by: Peter Robinson --- tools/buildman/toolchain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 324ad0e082..ff987a9eea 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -201,10 +201,10 @@ class Toolchain: if self.override_toolchain: # We'll use MakeArgs() to provide this pass - elif full_path: + elif full_path and self.cross: env[b'CROSS_COMPILE'] = tools.to_bytes( wrapper + os.path.join(self.path, self.cross)) - else: + elif self.cross: env[b'CROSS_COMPILE'] = tools.to_bytes(wrapper + self.cross) env[b'PATH'] = tools.to_bytes(self.path) + b':' + env[b'PATH']