U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	Andrejs Cainikovs <andrejs.cainikovs@toradex.com>,
	Jerome Forissier <jerome.forissier@linaro.org>
Subject: [PATCH 6/9] buildman: Correct logic for adding a toolchain
Date: Fri,  8 Nov 2024 08:23:47 -0700	[thread overview]
Message-ID: <20241108152350.3686274-7-sjg@chromium.org> (raw)
In-Reply-To: <20241108152350.3686274-1-sjg@chromium.org>

If the toolchain is bad, it should not be added. Correct the logic for
this.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/buildman/toolchain.py | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index 0c8a4fa16eb..dab350fec31 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -327,16 +327,17 @@ class Toolchains:
         toolchain = Toolchain(fname, test, verbose, priority, arch,
                               self.override_toolchain)
         add_it = toolchain.ok
-        if toolchain.arch in self.toolchains:
-            add_it = (toolchain.priority <
-                        self.toolchains[toolchain.arch].priority)
         if add_it:
-            self.toolchains[toolchain.arch] = toolchain
-        elif verbose:
-            print(("Toolchain '%s' at priority %d will be ignored because "
-                   "another toolchain for arch '%s' has priority %d" %
-                   (toolchain.gcc, toolchain.priority, toolchain.arch,
-                    self.toolchains[toolchain.arch].priority)))
+            if toolchain.arch in self.toolchains:
+                add_it = (toolchain.priority <
+                          self.toolchains[toolchain.arch].priority)
+            if add_it:
+                self.toolchains[toolchain.arch] = toolchain
+            elif verbose:
+                print(("Toolchain '%s' at priority %d will be ignored because "
+                       "another toolchain for arch '%s' has priority %d" %
+                       (toolchain.gcc, toolchain.priority, toolchain.arch,
+                        self.toolchains[toolchain.arch].priority)))
 
     def ScanPath(self, path, verbose):
         """Scan a path for a valid toolchain
-- 
2.34.1


  parent reply	other threads:[~2024-11-08 15:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 15:23 [PATCH 0/9] buildman: Add initial support for config fragments Simon Glass
2024-11-08 15:23 ` [PATCH 1/9] buildman: Add a lower-level test for KconfigScanner Simon Glass
2024-11-08 15:23 ` [PATCH 2/9] buildman: Set up the tout library Simon Glass
2024-11-08 15:23 ` [PATCH 3/9] buildman: Support #include files in defconfigs Simon Glass
2024-11-13  2:40   ` Tom Rini
2024-11-13 14:39     ` Simon Glass
2024-11-13 21:53       ` Tom Rini
2024-11-15 14:26         ` Simon Glass
2024-11-15 16:12           ` Tom Rini
2024-11-08 15:23 ` [PATCH 4/9] buildman: Correct the indentation in the setting-up section Simon Glass
2024-11-08 15:23 ` [PATCH 5/9] buildman: Document the toolchain-prefix section Simon Glass
2024-11-08 15:23 ` Simon Glass [this message]
2024-11-08 15:23 ` [PATCH 7/9] buildman: Support a tilde to represent the home directory Simon Glass
2024-11-08 15:23 ` [PATCH 8/9] buildman: Propose a format for extra boards Simon Glass
2024-11-09 22:55   ` Heinrich Schuchardt
2024-11-13  2:40   ` Tom Rini
2024-11-13 16:03     ` Simon Glass
2024-11-13 22:20       ` Tom Rini
2024-11-15 13:37         ` Simon Glass
2024-11-15 14:44           ` Tom Rini
2024-11-17 19:48             ` Simon Glass
2024-11-17 20:52               ` Tom Rini
2024-11-08 15:23 ` [PATCH 9/9] RFC: Show building with #include in defconfig Simon Glass
2024-11-19 22:12 ` (subset) [PATCH 0/9] buildman: Add initial support for config fragments Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241108152350.3686274-7-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=andrejs.cainikovs@toradex.com \
    --cc=jerome.forissier@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox