From patchwork Tue May 20 05:21:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 891292 Delivered-To: patch@linaro.org Received: by 2002:adf:e88a:0:b0:3a3:61c9:c5d4 with SMTP id d10csp1427899wrm; Mon, 19 May 2025 22:22:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUpx7AUiax8Gc/KfbYnJhBpY+eVjFMwXrnXBaOSz8Scc/8VdaCZh9Rrwsqel9Ij3OxsoNcSmw==@linaro.org X-Google-Smtp-Source: AGHT+IEVAd25KsuY/OyIB3s5CFDo96oQnr6G8t3BrqkF5EusNLB/UqDKL6YHDUl1UYROTA76P0i2 X-Received: by 2002:a05:600c:3554:b0:442:cd13:f15d with SMTP id 5b1f17b1804b1-442fd67197dmr141177845e9.29.1747718535276; Mon, 19 May 2025 22:22:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747718535; cv=none; d=google.com; s=arc-20240605; b=PrYRAGGspqlqroomYlNyn3CfdjQPiDN4yfURuFwKryjRv3pf99LIBx76LezOIEArd8 jSNXZTk5pjV0Qm8OP/GJzE9BRzsajf1L2A6r/tTphL3KNklpQOsOYNBbFdSQc+Ztcn3n bGm/VZrOBFTcXRmy0mevzb0Rr/k5G6i/mNfcv+LGyYrCWLnXMhA49aPRm3vrscPEBB7I pLejxsfIPDH2FGepO0Ej7vrK6HhFPLJWKbY8QekcBHm3fy49uxu53UUS4XRr5sKwSPAG qUZVTCGhalp892K/HNzj0j4pUu4yQ+C3pkRjEQi8WfF4CNwgA2m5jTePkFB4ruEhBs6d kDwg== 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=QfQ1a4M1KVIw2CBwf7u747pnSGqTK3IwJyxpzizwiWQ=; fh=fgKJDaMo1KMtS1FZwIIUC7UmZdBzBON83nT//od/rJU=; b=ez82kvnjetxTIs1K0DpC8hKKDOuBQMmKnefieJAIx0Th81NZAnSiIcivLwGvud4ILt uVu7xsH81GjV+D3+OtJk28P9pASYU3voYP4P4m4kol2FTfGJ/pDcjlIZwUnrYyMXgdA1 ci05XPjj7R7GUuExw3dVjPFEY1jcHI/Bv5ozSYMVcsdXiafrdbC3uqdLusiBDY0ffTIu 75UdlQmYzyKbQbAQTV9UD0YwUtkHqG0PpwWRFlZmGjB2j1S5Mbs9yX1fndX0vGV7DR+Z 4L5DnKZLW49sKNmWLyGKcMZoDS56vRmKpTaBLMIq+1P1XKpdryFx2QSz2J4MeXug4BLz xB5g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gF2vhB0d; 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 5b1f17b1804b1-447f3bebd3esi6822775e9.98.2025.05.19.22.22.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 22:22:15 -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=gF2vhB0d; 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 BD08082BF3; Tue, 20 May 2025 07:22:05 +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="gF2vhB0d"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F3CBB82BF2; Tue, 20 May 2025 07:22:04 +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,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (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 050F782BD7 for ; Tue, 20 May 2025 07:22:03 +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=ilias.apalodimas@linaro.org Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3a36efcadb8so1447286f8f.0 for ; Mon, 19 May 2025 22:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747718522; x=1748323322; 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=QfQ1a4M1KVIw2CBwf7u747pnSGqTK3IwJyxpzizwiWQ=; b=gF2vhB0dhR1LtY0o05iYkUdnBfuHGL2IS0/nEKhNZ1bx8rCMCUI+I4743UW+c+ZFvb ffsiouFQjQneE6duMa4auhkdZcSDnURdotTPcepFHlD4GfvU3k00vcYNzOPa4xaaiuv6 xO/lxc2gR9jykD73ZCRJ6FUtLJdX4APZoQW0m31Vad1OGJWhkClGxyr9HrIyCBrwOZus cdxh1KucxgCjnhKxNgqboXUjCUZKNPCcQpgM0bxN8iZS7uVSycy4BjH67TZRSZ/02iqF hWfoUneUXD3ScCMqryW9nZDYuLtgz/VWHYfHOK3UxUdgXPl5hUI+TFsyJxnzVqsTG3Mc klEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747718522; x=1748323322; 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=QfQ1a4M1KVIw2CBwf7u747pnSGqTK3IwJyxpzizwiWQ=; b=G/Jc/wwyOfUdxJTIQWkuiRzJgmIOZnv01+T2QYjEwITV2G3Q5JtCyaoavayc0ZYdan mLUlHZQPjSIEq18sdYl3KXO84h6ir1OH3dBkWh0Yw1t+Yma9qPT+iyh9+ZwcrP6Z11cp 3SWUMAXAU3QKNu94CNTqNQ2pDUplGubVbbEqmi5G3Fsr2nGAwvYA+1Efm1xCS6gdnN5k oqUGiB7WNq21fsie+naszayu68ZDhb0+Kmj+q8Ta9bi56aXyfcWIIFxGAJyhoRH0trBQ nSXucCelT90d9eBKEhCLFz7g62AO1AoDCKlpmatI8lSh+v6r2lR9A75ZretZUQ7ZEzZR cF8Q== X-Forwarded-Encrypted: i=1; AJvYcCWGzGTcNaD0F8nPfMI5f7Ad6ecMzmZMXtg176ARxyniTpGnbH6jTQcrTFrLJ67yTV3dpZAn+vM=@lists.denx.de X-Gm-Message-State: AOJu0Yzpmg6dAOEnO50M9hLBMUHpqb+1j3BJP0gUGw1A5kkI40nA7zbO XRyKRZLeIh1h7zCguQ/2NQ9tdklkEjeuR2i9zUAoiNWAQZLIFcDTHhAV4oOMfa6FqhA= X-Gm-Gg: ASbGncvUuMXeUXHOnv5UzxJ/ChjbgObfok2lHxzt4fEA+opIxf/wQkRaRp6mSeeEqKa C77EVvHI9Vfzv8AMrb8adg/VE2ThX+W10yvMAdHzt/MomokI0G5E+wUyJQnsUJWnSBpAYYCyMoR 04r8gZTZoWzGkwIjyUSRyM8AiqZyuSDIuhPaFfuppV6xhX/ehQcu50R69oNjjIWAA/C2eWviQNW 7qh1eujXxyO3zpczApVWs+0p+7jHPOul8xlSN+FV3cwRl0WPqOOpQEquZAL1zHCIJNeWV1D32bZ W4HgzplHhdsvIRMtBFTzBvUJ8NZ11o9jVq4BFO9ziCTCrR5/knYiKF1nB7cKCDOnkrvyLnN5pzI = X-Received: by 2002:a5d:64c7:0:b0:3a3:6481:1ca4 with SMTP id ffacd0b85a97d-3a364812b25mr10748158f8f.43.1747718522485; Mon, 19 May 2025 22:22:02 -0700 (PDT) Received: from localhost.localdomain ([46.198.180.244]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a35ca889e6sm15100762f8f.71.2025.05.19.22.22.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 22:22:02 -0700 (PDT) From: Ilias Apalodimas To: trini@konsulko.com Cc: Ilias Apalodimas , Simon Glass , Marek Vasut , Peter Robinson , Prasad Kummari , Michal Simek , Jiaxun Yang , Rasmus Villemoes , Sam Edwards , Jonathan Humphreys , Heinrich Schuchardt , u-boot@lists.denx.de Subject: [PATCH 01/24] kbuild: de-duplicate fixdep usage Date: Tue, 20 May 2025 08:21:12 +0300 Message-ID: <20250520052153.307194-2-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250520052153.307194-1-ilias.apalodimas@linaro.org> References: <20250520052153.307194-1-ilias.apalodimas@linaro.org> 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 Backported from the linux kernel commit e4aca4595005 ("kbuild: de-duplicate fixdep usage") A lot of the kernels kbuild depend on that patch. Backport it and pull in the 'rule_as_o_S'a rule as well. This might end up being unused but it doesn't break anything and makes diffing the files easier. Signed-off-by: Ilias Apalodimas --- scripts/Kbuild.include | 5 ++++- scripts/Makefile.build | 17 ++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 054dd157485c..7468223d3233 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -266,10 +266,13 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ # Execute the command and also postprocess generated .d dependencies file. if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \ @set -e; \ + $(cmd_and_fixdep), @:) + +cmd_and_fixdep = \ $(echo-cmd) $(cmd_$(1)); \ scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;\ rm -f $(depfile); \ - mv -f $(dot-target).tmp $(dot-target).cmd, @:) + mv -f $(dot-target).tmp $(dot-target).cmd; # Usage: $(call if_changed_rule,foo) # Will check if $(cmd_foo) or any of the prerequisites changed, diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 90aed148c44b..10f31a57a0f9 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -241,14 +241,17 @@ endif define rule_cc_o_c $(call echo-cmd,checksrc) $(cmd_checksrc) \ - $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \ + $(call cmd_and_fixdep,cc_o_c) \ $(cmd_modversions) \ - $(call echo-cmd,record_mcount) \ - $(cmd_record_mcount) \ - scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ - $(dot-target).tmp; \ - rm -f $(depfile); \ - mv -f $(dot-target).tmp $(dot-target).cmd + $(cmd_objtool) \ + $(call echo-cmd,record_mcount) $(cmd_record_mcount) +endef + +define rule_as_o_S + $(call cmd_and_fixdep,as_o_S) + $(call cmd,gen_ksymdeps) + $(call cmd,objtool) + $(call cmd,modversions_S) endef # Built-in and composite module parts