Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82F4E606A333 for ; Fri, 4 Dec 2026 18:14:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.u-boot-project.org header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default header.b=YmjjwACR; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ebugZMwo Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 63B8140976; Fri, 4 Dec 2026 18:14:12 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id WFxUGO6VM5ja; Fri, 4 Dec 2026 18:14:11 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org 5F0BB404F8 Authentication-Results: smtp4.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796408051; b=mDgc6nxH3Kn9r5rvz/kmgUMVfXoqyCEeY4yTXplkBqy5ta5fgTvut6m/EWDkrc8KqK3p J2KZMUCuQJ3fXlu7YKauFNB0cJpNSwYtp//8YunpXm6qG0O2DQWOb5rX9hI1v9tsVw5Hx IU1MjmQIeHDcrey0ETkjFotMA6c4QWbiBCuO0AQdl7DXNqmITRBovo8BjcqYNGsN0lsO/ fxfKf3E0ecUzV65A3tyb+g+vuQbnc4AM/1yTWXRpeOtbFsyA2xaYr/CMqBUwLJE9L3V4T P35CTf+1WUdXvJwjysfow+8Duu6qJeeLz6+1ub+JUehJ1Nin0MFgsHgpTEqGg9xF4JQ== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796408051; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:Received:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-BeenThere:X-Mailman-Version:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Errors-To; bh=bfUa/dKMcT3opgzvWPj6qRcoNHYRPU1zhljUm3ssN0o=; b=RcgBsUMhnEaiV5EZ4MCqewFL3SX7MjK95Oipf7mDy5JScv0UFdJ5E6bZe4937xH4w6Hd efsvDfueztl8b+SmuiAkJSj58TwZdFWcv3EzlAZ+/3nfAhCF4uvtUM4QWdpoPPTMyGvR4 ftkz8Vdfh4qN9InxNmpdSmU0kQ1cBoXSeDIsscPYRKU1PVVemOnynlnfZsybUw6xIZCC+ xVs6dii75AaOwU8hwBmHwRANSdJtF2XGSBi9FdYOkZpzeTaxAl1I245vIjaYyzVdh+MAQ Bo3MPsqWKY1SJ7sj1dYTvsB1EtYKK5z0XSx0eM6VtEkB8fLAq8rnfQrVCCNeTxXy+Pg== ARC-Authentication-Results: i=1; smtp4.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1796408051; bh=bfUa/dKMcT3opgzvWPj6qRcoNHYRPU1zhljUm3ssN0o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=YmjjwACRLrD1yXbZqDf1B4gfykgH0xRBBD50HMk77KujOKKnecZOIRFIbKUnc1zt0 /8lYLWob9b3708DfTyo78kpGFnSIOym593vC9leR6MaQ2wuiqPvFSuuVRFoBtE+EF2 OVqJzWLU+qSsxgkclIBGhRgkBbjzoS3pqVfb+GpQ4rwaQruxCeWRSmIupETFGUefX8 7+hE8HlgNVlyvhVGA7YsSp2xTVOTvq3upJJgGlDjxlNNsv0bP6YnxI1JXPIyccv3Sa gXbBfBu9ADYmyrS1KUEtbpec6xjCOIaKX5q5aB3A41YHoTXPnF1rcmIxhZ7vQbceub Ke72Nf7mvSQFw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 5F0BB404F8; Fri, 4 Dec 2026 18:14:11 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id BFF792E0 for ; Fri, 4 Dec 2026 18:14:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B1DE583ABE for ; Fri, 4 Dec 2026 18:14:00 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id yj8n9EwUoXrc for ; Fri, 4 Dec 2026 18:14:00 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org 9007683ABA Authentication-Results: smtp1.osuosl.org; arc=none smtp.remote-ip="2a00:1450:4864:20::432" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::432; helo=mail-wr1-x432.google.com; envelope-from=andrew.goodbody@linaro.org; receiver= Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ebugZMwo Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by smtp1.osuosl.org (Postfix) with ESMTPS id 9007683ABA for ; Fri, 4 Dec 2026 18:13:58 +0000 (UTC) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-48dfc0421d9so1080962f8f.1 for ; Fri, 04 Dec 2026 10:13:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1796408036; x=1797012836; darn=lists.u-boot-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=bfUa/dKMcT3opgzvWPj6qRcoNHYRPU1zhljUm3ssN0o=; b=ebugZMwouikIygaoPji8SZAxfSHZkXj+HNfWJiZ4VtCc8KJuh2/b46D8Yeg6hpUHkt P5XZ9dsGK9Egwo+rZI9brs/Gxu5dl+UeD7UIQRHO3n2PcaB3qhMZmJ9hpWMAy2fmDVX1 7ksGZaObJnQoYiUjzOWQ5coko+LFlD2oByWhK+bDO78QmhJCYHyntrCRJIxhgnXynwu6 ic7nxfG6OBN0cEH3DEMnFElXak0xy++4dyyWaqf6x+7A3J0ES1KN5qN/Ryv/U0Xtmd0z MwVUfUAMBsbDRq3gGvLHWQ99Oftk+5wPWvYb5oVsBFrZmXpFNhXb/M5VAeUmF63qVYD+ BqAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796408036; x=1797012836; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=bfUa/dKMcT3opgzvWPj6qRcoNHYRPU1zhljUm3ssN0o=; b=K3D6AisuuPQWccvoZzBSlpikH2b5Seyh68gIt0fZEkTaiFVcUko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mXNjp7fU X-Received: by 2002:a05:6000:2c09:b0:4a5:4367:dc84 with SMTP id ffacd0b85a97d-4d1e8cc360dmr5872054f8f.18.1796408036245; Fri, 04 Dec 2026 10:13:56 -0800 (PST) Received: from artemis3.elfringham ([2a0a:ef40:ee3:3401:7071:3a81:cc99:9c2c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4d174452809sm6915361f8f.53.2026.12.04.10.13.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 10:13:55 -0800 (PST) From: Andrew Goodbody Date: Fri, 04 Dec 2026 18:13:47 +0000 Subject: [PATCH v4 12/14] buildman: Cope with CPP="gcc -E" X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261204-qcheck_fix-v4-12-3cdf2e164297@linaro.org> References: <20261204-qcheck_fix-v4-0-3cdf2e164297@linaro.org> In-Reply-To: <20261204-qcheck_fix-v4-0-3cdf2e164297@linaro.org> To: u-boot@lists.u-boot-project.org, Kory Maincent , Linus Walleij , Ilias Apalodimas Cc: Andrew Goodbody , Tom Rini , Anshul Dalal , Alexey Charkov , Heinrich Schuchardt , Mattijs Korpershoek , Carlo Caione , Yao Zi , Michal Simek , Quentin Schulz , Marek Vasut X-Mailer: b4 0.16.0 X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Allow the use of "gcc -E" as an alternative to "cpp" when set in the environment as the value of CPP. Accept it as a valid command for running the preprocessor and adjust the test to not depend on a fixed number of arguments. Also split it into parts for constructing the command list so that the validation for running a command does not fail when it tries to find an executable named "gcc -E". As well as -E accept --preprocess. Also accept clang instead of gcc. Reviewed-by: Quentin Schulz Signed-off-by: Andrew Goodbody --- tools/buildman/boards.py | 4 ++-- tools/buildman/func_test.py | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py index 5d5d3a3822b..1e871c9921d 100644 --- a/tools/buildman/boards.py +++ b/tools/buildman/boards.py @@ -12,6 +12,7 @@ import glob import multiprocessing import os import re +import shlex import sys import tempfile import time @@ -244,8 +245,7 @@ class KconfigScanner: temp = None if b'#include' in tools.read_file(defconfig): - cmd = [ - os.getenv('CPP', 'cpp'), + cmd = shlex.split(os.getenv('CPP', 'cpp')) + [ '-nostdinc', '-P', '-I', self._srctree, '-undef', diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index fce615ba8b8..4122e7cdc51 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -378,7 +378,12 @@ class TestFunctional(unittest.TestCase): def _HandleCommandCpp(self, args): # args ['-nostdinc', '-P', '-I', '/tmp/tmp7f17xk_o/src', '-undef', # '-x', 'assembler-with-cpp', fname] - fname = args[7] + # If 'gcc -E' is defined as the preprocessor then the args list will + # have an additional item, '-E', at the beginning which changes the + # number of items in the argument list. In order to guarantee picking + # up the filename use -1 as the position which will always be the last + # item + fname = args[-1] buf = io.StringIO() for line in tools.read_file(fname, False).splitlines(): if line.startswith('#include'): @@ -424,7 +429,9 @@ class TestFunctional(unittest.TestCase): return self._HandleCommandObjcopy(args) elif cmd.endswith( 'size'): return self._HandleCommandSize(args) - elif cmd.endswith( 'cpp'): + elif cmd.endswith('cpp') \ + or ((cmd.endswith(('gcc', 'clang'))) \ + and ('-E' in pipe_list[0] or '--preprocess' in pipe_list[0])): return self._HandleCommandCpp(args) if not result: -- 2.47.3