From patchwork Tue Aug 19 19:39:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 30 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755632424; bh=qzguj3XQfMNRr9kOj+DAcbKHj+4qA7qmLUaSAx9cYSA=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=sxgZn6J8FYauugI5uxQfX47zG1GdE00WmdNbDUncJGHYMiZzu1kT1fXFQft0j0SSV OBFTP/fXzDXASWIAsx6tR7RnP8GRxySMx3nu/MYuPdLhPF7naEYWTDIiEWik7ehQZV uwJk55h3eYBVOttIOw8BMxHbWy7z2QyaA/Jp2XuYTGIWiSOH89OIS9vDH2wdv43yDb 2OF2DKOjGBgOd63N7lhioH8vkB5EC3eNX7TT+5e94wKJlUywXAvIYhMaO1DOjPwFhm IYkNYJ7y+WmNs6m/arD0kvkY2YGN/iisu78yZgUfRwd2tf+1d4yANLToW1H3L1Mm5x oaum6y4lnq6Tw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 36665675F4 for ; Tue, 19 Aug 2025 13:40:24 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Ili-unOY4qvk for ; Tue, 19 Aug 2025 13:40:24 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755632422; bh=qzguj3XQfMNRr9kOj+DAcbKHj+4qA7qmLUaSAx9cYSA=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=OT3UsUzbqqy0FvkRBXOcIjoeJe4EkCoVb+ua79MYXfmnPieVEU7unDFJcvaA1StF4 JskJVhc042EWrc+Yj+p4wo6momuPtqdCWLqoTH6V126waq67Ib1h7q/BN2SUcdBy7J v8oQBn80VSsQDWHpNdGYiC8/aZNO8HwTAyNjKXWwdMvCfciAa+P8kdDYw40SXwKQMn 4/PB1orZhzLHb6N+Jf27vjUUA3nAuJK1hurbl1I3dx+u3viymVCXc6eSFFcaYCjZnI hTchj28BhqV8Cv4TaonnX1JvDu/IxmwJJScE/MflsX4aJmA4vwdJyy0eF3uKj0nKD7 p3+sVmFJ8OpIw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 30DDB67624 for ; Tue, 19 Aug 2025 13:40:22 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755632420; bh=BkSbEH2FJXsPMyajXfvFvNreg+JPSpnIaiFs7wpbz4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wvvqJL7Bp9npuJSz1prOwpBfwFE2rHDjOnqpPtN3MJRnpbwqXgJl1P1rVrvHUg/xe Ah85/JnAm+pTq4JutVyVKknhNr3Kn28shdlx4nTcBKBXhI/MJNoM+PVznrIoIB3Ixt pQnATKqK+MwainUz9x+SBAlyCE9ugVUfjREF7dCfoq3cJSiFgSZYCwjBNyRcM9lFWj ggjJpAluvu3wvxN+SkiUYdxJpVYihIrTKKGjelZFUAvWOv25eleloAtqNW92+sbXfK qLKUsYz8l9AmPu5YXdizJUssq15BmExrjfY3A1tQviiDG9sJIBEH9Mu0SF/Hy1DhE5 GlVHHgurOPESQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4AE0167608; Tue, 19 Aug 2025 13:40:20 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id TgYKUNs7FRa7; Tue, 19 Aug 2025 13:40:20 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755632418; bh=6VS4tcjKWU1K388FSJskhTdlcUM+90j6BHRFO1ewjYM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z4IQP0sS9o9i4k9wNaGy+gUsNPDrVeslCzVNBGhSEOUiFm2ky9ILlQQW9SNHJJNDU ZCLF8yDj4SwjYZxLj1MApRHRoXHJ3p5XRUcADpS3+fsY662fRHdPKuw8TkPNnQRrmv qdjAPRNzpd4tzjNQxYXlPaJ4Botth+BV+vLS/Y8VzZXzuyd3KKoImxlL9YFGpfOAXu +xGSPpBjdAqsPLXFDrqRquS4BPdiGoyvEbH2T7Isa2uGkfVtwAdjenaZ6D83G1Qniz 4ZaNYdkiiH49Bsmq+elOXHKNRwASBclHrrAQSGU7cmzpS6rUo/iGCXr4tAIRqcDAuD 5Vzit7QO80Wsw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 618565E436; Tue, 19 Aug 2025 13:40:18 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 19 Aug 2025 13:39:03 -0600 Message-ID: <20250819193918.874215-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250819193918.874215-1-sjg@u-boot.org> References: <20250819193918.874215-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: GEVVIC4HG6XHFGFYK2MTOQEYBFQT3TDU X-Message-ID-Hash: GEVVIC4HG6XHFGFYK2MTOQEYBFQT3TDU X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 07/15] buildman: Handle CPP being in the environment List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass If CPP is set (e.g. to 'gcc -E') buildman currently gives an error. Add a little more logic to handle this case. Signed-off-by: Simon Glass --- tools/buildman/boards.py | 4 ++-- tools/buildman/func_test.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py index eaeeb5ec8dc..2330315fe95 100644 --- a/tools/buildman/boards.py +++ b/tools/buildman/boards.py @@ -247,8 +247,8 @@ class KconfigScanner: temp = None if b'#include' in tools.read_file(defconfig): - cmd = [ - os.getenv('CPP', 'cpp'), + cpp = os.getenv('CPP', 'cpp').split() + cmd = cpp + [ '-nostdinc', '-P', '-I', self._srctree, '-undef', diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 968765b713c..6fc08e02fb8 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -427,7 +427,8 @@ class TestFunctional(unittest.TestCase): return self._HandleCommandSize(args) elif cmd.endswith( 'cpp'): return self._HandleCommandCpp(args) - + elif cmd == 'gcc' and args[0] == '-E': + return self._HandleCommandCpp(args[1:]) if not result: # Not handled, so abort print('unknown command', kwargs)