From patchwork Tue May 20 05:21:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 891299 Delivered-To: patch@linaro.org Received: by 2002:adf:e88a:0:b0:3a3:61c9:c5d4 with SMTP id d10csp1428214wrm; Mon, 19 May 2025 22:23:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW1d7VpgaQpFtK4Ju4ibW5zHzDOLsrZ+cpNdqVSUf2sAyQtOZiWcy98EnG1GvHXjZurGARuiA==@linaro.org X-Google-Smtp-Source: AGHT+IH4wQQ0IGeKPD/P4buGCBFMdo0tac2OSNdwVuoGc3JBjw2msbgn/YcB0aqahidD+RmJqM5M X-Received: by 2002:a05:600c:3e88:b0:43d:94:2d1e with SMTP id 5b1f17b1804b1-442fd627303mr141234135e9.13.1747718602478; Mon, 19 May 2025 22:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747718602; cv=none; d=google.com; s=arc-20240605; b=kg9uXXV30oTvnu9Nyyj64NQGhDd38Am8pVmXMwyoHluvTKMMfbMe6Lrjg1ee9p7Wyd YgMBRkYxuO3Yt4K6JHFbxo82VNR7hLEG1ygGAxYpiLeHl9rw3G1xvXOVU3XNjCPp0iZN fA7b79K+u8ltkNXDxPTLN7IRGB3WDaDDOT3RbalUeBNaA7YPZVjmfNU00xv7EFJ+AJLW P1Egz1/bo8aEhH6F4jwxmJnrghqwfYPaQh1mbqqGnGQBFEv36C9Hn1NMo9DWzq4HfO6O OQOGfedjNKk4MyeNybV6eTJYnormTmlBdUdg+uFKd+KahuqDWp4EQuQiXSXfeORVXkXk R20w== 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=MNw18Apz6e/E3KjGZ+WTdqsXhZKTri/y2r4tNvNh1Qg=; fh=nIygtionIStRQ6CipTOAnS/zxFLFxarwveo3Ak2SYcg=; b=kMN4XNzrB6AmqIi0CQAakaevQmMB62nCJHxHkUBaNk5gBCh6IVRztA7aLPMEnrfA+N lbtBKlfcpMUv1vjYRLubEJqxjalefL0ycjYAidYrvklo8gsKAQn9xWNQo/kTQQNP3/hA cMsD9Qh+LsJqd7+G4iA/Zr/ECU3Muruq77tQBfPRvjVWa2Dsf+txwJev9Vqc7mdc1w52 nRD1VTzQVxihjTQQyiouOpOvwsA1Lt15Rl3gd7nXdXIUH+qjgdE2pc8J1OSJYPP8DpRL x3Qm4AOk0unQpBwlHA6B4a1YeBXLKO/0Yo2ue96+fGD9YsPjjMbwLyC+JkIkEBVGQP6U 9goQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UQKtgX1u; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail 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-447f77b853dsi6459345e9.124.2025.05.19.22.23.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 22:23:22 -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=fail header.i=@linaro.org header.s=google header.b=UQKtgX1u; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D793B82C7F; Tue, 20 May 2025 07:22:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (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=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="UQKtgX1u"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6E9B782C7D; Tue, 20 May 2025 07:22:21 +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-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 74FB082BD7 for ; Tue, 20 May 2025 07:22:19 +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-x432.google.com with SMTP id ffacd0b85a97d-3a365a6804eso1655682f8f.3 for ; Mon, 19 May 2025 22:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747718539; x=1748323339; 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=MNw18Apz6e/E3KjGZ+WTdqsXhZKTri/y2r4tNvNh1Qg=; b=UQKtgX1uSyNL5nP5CABlnYpDE6jJJe1ZHVpWucobXwjkfjHmNJJGpoJ148h5I/miyi /lc1oGHcatXP5Z3xUhSoPZwzpFlmhawqK0sWw4n2d9rHUFE9DjqYMPM2iy5221Wpz48Y 9Dsp6Otpzh+EztWQZWU4KoB0/02Yx04xzh0DrnVhhrpgkRXHXUzW52iWEjm7dFhrrXlm 6po1hQztvUBMVgF2iQ+wOtHZYWSDZ3a3uvy7L8Tg2iOLmCcjT0imikJLt5A1EmB9W8An FIVgYB//4QIhd7jhFk1jNwHvvknToCGLrKL0MXJki+0B7g4u+zOqmF4AwxYkmja9mCyr 8MhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747718539; x=1748323339; 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=MNw18Apz6e/E3KjGZ+WTdqsXhZKTri/y2r4tNvNh1Qg=; b=IT9g0HhCMNsqeHKAMaxsGdlFkt/pgCaINZbId7WzoKUKRcCeuVd8QE5GD6rlIYgmof HR+f5Dx+wr+giTEUZyewfmp50ttLI5JooqUyF7KInc9Y0C+SfI0OXPw295TZ2jcCU407 /kjJiYhcYspWixI5V2M2qtX/Y5u4opNu415uU70KEzkqhJPg5kdcrP7XfFYGfwV1pSEk ZqxRDYI4h13M/30aLuD3U3utvZb+JwKrZh3EAY9AwHtVFIgDc+zp+hdmMVDejsM+GH3v YUbrTn4p464gdpjgfo8lIWSUPSKwVjdoTRYwn5Ht6XmINWRwvTPz2/OjNvyyCKFx/1cr piFQ== X-Forwarded-Encrypted: i=1; AJvYcCUFM0AZn7VZx6A1ghLue8P6NUlN+UQaK9PYW31I/MvkdUv3BPt5Ado3plzXyKeCrPWFdl12erg=@lists.denx.de X-Gm-Message-State: AOJu0Yz0nAKcgffwloiUaLcN14CrmU3bNLk1CiV/QvrgBzecMA8+ZHdD wGTAt5y7aNknFs40LcYkQ935RjHHF2AW9avEtoG1j/dJAJV+dhEehNKcKw8sJPc23Qk= X-Gm-Gg: ASbGnctlPQYg8fPWTR1c6VusyiQMA3JvEjv4BB4rIrJDNxBMQ+GMVzBqLFAYV2lT/6U LROkGimR4ktswE0lIQO2rlMp2r7zB+bVLoG1W6r9dB53vId4gg1aEiSGQAOQDpyEoBlGM4rrfSs 5yb5G99P/Az+3gb4BgwqTVlefP4aZvlnIxInQrW6ZiAuwOhGRKVJ6GRbEXRKouVhdqoFYHirhqr HGbGdf4+wPDVQ+6z3Zv2AKVzfoHthPOHNJI3MNWc2YI81WetqxWr72MXB5iFzLDC2tPcixPgalD o1kgjgM62Lyk5Xx0PvwfXf7d0MpvyXwxK9HkKHkwS7lqkC8pkZr/k04EPXvY5nKgehAAPVWYUR4 = X-Received: by 2002:a05:6000:144f:b0:3a3:7ba5:93a5 with SMTP id ffacd0b85a97d-3a37ba593dbmr388599f8f.26.1747718538930; Mon, 19 May 2025 22:22:18 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 22:22:18 -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 , u-boot@lists.denx.de Subject: [PATCH 08/24] kbuild: add real-prereqs shorthand for $(filter-out FORCE, $^) Date: Tue, 20 May 2025 08:21:19 +0300 Message-ID: <20250520052153.307194-9-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 Backport from kernel commit afa974b77128 ("kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^)") Signed-off-by: Ilias Apalodimas --- scripts/Kbuild.include | 4 ++++ scripts/Makefile.build | 2 +- scripts/Makefile.lib | 10 +++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 7468223d3233..2ef687ea895a 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -27,6 +27,10 @@ basetarget = $(basename $(notdir $@)) # filename of first prerequisite with directory and extension stripped baseprereq = $(basename $(notdir $<)) +### +# real prerequisites without phony targets +real-prereqs = $(filter-out $(PHONY), $^) + ### # Escape single quote for use in echo statements escsq = $(subst $(squote),'\$(squote)',$1) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 10f31a57a0f9..73e1d71e30df 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -356,7 +356,7 @@ $(modorder-target): $(subdir-ym) FORCE # ifdef lib-target quiet_cmd_link_l_target = AR $@ -cmd_link_l_target = rm -f $@; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y) +cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) $(lib-target): $(lib-y) FORCE $(call if_changed,link_l_target) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 6d0cb8e6513f..4861b1332c3c 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -546,7 +546,7 @@ $(obj)/dsdt_generated.c: $(src)/dsdt.asl # append the size as a 32-bit littleendian number as gzip does. size_append = printf $(shell \ dec_size=0; \ -for F in $(filter-out FORCE,$^); do +for F in $(real-prereqs); do fsize=$$(stat -c "%s" $$F); \ dec_size=$$(expr $$dec_size + $$fsize); \ done; \ @@ -560,19 +560,19 @@ printf "%08x\n" $$dec_size | \ ) quiet_cmd_bzip2 = BZIP2 $@ -cmd_bzip2 = (cat $(filter-out FORCE,$^) | bzip2 -9 && $(size_append)) > $@ +cmd_bzip2 = (cat $(real-prereqs) | bzip2 -9 && $(size_append)) > $@ # Lzma # --------------------------------------------------------------------------- quiet_cmd_lzma = LZMA $@ -cmd_lzma = (cat $(filter-out FORCE,$^) | lzma -9 && $(size_append)) > $@ +cmd_lzma = (cat $(real-prereqs) | lzma -9 && $(size_append)) > $@ quiet_cmd_lzo = LZO $@ -cmd_lzo = (cat $(filter-out FORCE,$^) | lzop -9 && $(size_append)) > $@ +cmd_lzo = (cat $(real-prereqs) | lzop -9 && $(size_append)) > $@ quiet_cmd_lz4 = LZ4 $@ -cmd_lz4 = (cat $(filter-out FORCE,$^) | lz4c -l -c1 stdin stdout && \ +cmd_lz4 = (cat $(real-prereqs) | lz4c -l -c1 stdin stdout && \ $(size_append)) > $@ # U-Boot mkimage