From patchwork Wed Jun 12 04:42:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1946636 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=EY+uji30; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=FCJcdVEW; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VzXwb3r67z20KL for ; Wed, 12 Jun 2024 14:43:09 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=r0cq9zZYPtSm3S+/3BKKgNWlx+Hs9U5fcGsriJ7PuxI=; b=EY+uji30reJebO hOoQK815HfZvQapv/HHGtvPk1uo+oLc8+6/qaOY/PMwLJ1B9m9hUrnB/wydAm+mwePQHoNHhUBiJe EyoR4ZnuBuJO6SpPAMz6k07/yhLczLeZ2NUAG39ZAOoj0I5GkWUpuaed+5eZK/H+IIoIyHm/kKqx3 N+vrKSn71ETkegYbeZeMvzqoSNSQd/sbjM9WZ93aJTW4uD8wzyRIEA4t8unRGpW+7wyrq07FKdxYp hayjzcQJKJZbYATtnRBlvr8mFZfoOTpPTpTly/chaXyoeJTHUyF4kLJntUTl5cOuHwsdBXxrp55rD xMR+ADiu1C4+NLNqt1qg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHFp8-0000000B3FD-2d4G; Wed, 12 Jun 2024 04:43:02 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHFp5-0000000B3DN-21GC for kvm-riscv@lists.infradead.org; Wed, 12 Jun 2024 04:43:01 +0000 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1f480624d10so56108455ad.1 for ; Tue, 11 Jun 2024 21:42:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718167371; x=1718772171; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=y8v3v+i8Ggw/AVGwDDCI9JHG5YYl3a/3EDerkme1e7c=; b=FCJcdVEWtuGE8Au8mHm1KYJXSiTEHFXL2pZbP/U8ORZjWFm1nlHSkD5QmaiIeVswIQ frlu49xAgtw1Ultat3SviujNnIttN7JlmfWKrbYzXwNQj8oZeYfL25lQk/4Jc3Zj1v98 +5LxxiKpZG9qABGtZQlyUTSP2ptoW80iX+OEhPEwkZas8YnZdudzJDrDfaVH0+zqsU4j Ng3Ag8wuwsIR0mzwzdexQ78pYdBkWl1VgvcdKNSImqXgQ3gqtLM9Zq7ru2NgeAiMqnW5 5XC0E6Jogv5IPJDE5fq0Jh7XO2gySAejHi/cHrMm1eVLzm2ZjZhuHU4PlrEeUJmsi/xv G6OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718167371; x=1718772171; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=y8v3v+i8Ggw/AVGwDDCI9JHG5YYl3a/3EDerkme1e7c=; b=XhWW2O1WPOOlDdmkCnaefHTmm3xVneq+lao+AfLqJ+cWtGPR4QbztJCMvpXJbCKDQR eE8wBmjzZCgIDGxefhNiecJCo72WPSxuzhN2g6b+Mp2Vfq802SsDi/BIjLSpQsaW1ph+ EPaMD6T9PKhwgDghiULc4Fj7Ms6E6emPIFeWQXJSEUgK7LSV8KP9WEAkJnwW3F3I4rAX Wf8VgD+CjN4/Gg48RIj1oN8Lg1bbug1cA12E61OIMoj8EvGle/NQV68vo5AmMePlQ2/S 0TztFOFAwhXsjZjz3ig2/brFOrPq8GkeWw1nYN8ImEKn8zqyt3MgTX8RXvnH/QdhxnYa 6m7Q== X-Forwarded-Encrypted: i=1; AJvYcCX2i0uxOFtY0F4fWg764SimnLeN+/vQory9NAdq5lFnQOT6crlop2OAf4U3fzy4vDo4R6m1HI+WIOYBehUV4X7UbSbItEvl8/6p82j8jg== X-Gm-Message-State: AOJu0Yxm6egI5lMon48H0K1teR/NS7/LxQGoZrL5fVMIb0nvHJjOdzBH GdKsy2+ASWVmhHUF6vDl8UgACqFSc2sy1ew6mnMUJRsI8bua87zBx3JGGw== X-Google-Smtp-Source: AGHT+IHpwHlh4iJRWgbNKg9wzqjgXtSTZ/ZgvwJw6UxQFuG3nQAI47SaA434g24rShYkZX8sK7hePg== X-Received: by 2002:a17:903:234d:b0:1f7:3d0d:4c8 with SMTP id d9443c01a7336-1f83b569c9amr9508185ad.13.1718167370569; Tue, 11 Jun 2024 21:42:50 -0700 (PDT) Received: from wheely.local0.net (220-235-199-47.tpgi.com.au. [220.235.199.47]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f71017b639sm52957535ad.21.2024.06.11.21.42.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 21:42:49 -0700 (PDT) From: Nicholas Piggin To: Thomas Huth , kvm@vger.kernel.org Cc: Nicholas Piggin , Andrew Jones , Marc Hartmayer , kvmarm@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-s390@vger.kernel.org Subject: [kvm-unit-tests PATCH] build: retain intermediate .aux.o targets Date: Wed, 12 Jun 2024 14:42:32 +1000 Message-ID: <20240612044234.212156-1-npiggin@gmail.com> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240611_214259_543571_4F4A6E15 X-CRM114-Status: GOOD ( 10.42 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: arm, powerpc, riscv, build .aux.o targets with implicit pattern rules in dependency chains that cause them to be made as intermediate files, which get removed when make finishes. This results in unnec [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:630 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [npiggin(at)gmail.com] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org arm, powerpc, riscv, build .aux.o targets with implicit pattern rules in dependency chains that cause them to be made as intermediate files, which get removed when make finishes. This results in unnecessary partial rebuilds. If make is run again, this time the .aux.o targets are not intermediate, possibly due to being made via different dependencies. Adding .aux.o files to .PRECIOUS prevents them being removed and solves the rebuild problem. s390x does not have the problem because .SECONDARY prevents dependancies from being built as intermediate. However the same change is made for s390x, for consistency. Suggested-by: Marc Hartmayer Signed-off-by: Nicholas Piggin Reviewed-by: Marc Hartmayer Acked-by: Andrew Jones --- arm/Makefile.common | 2 +- powerpc/Makefile.common | 2 +- riscv/Makefile | 2 +- s390x/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arm/Makefile.common b/arm/Makefile.common index f828dbe01..0b26a92a6 100644 --- a/arm/Makefile.common +++ b/arm/Makefile.common @@ -31,7 +31,7 @@ CFLAGS += -O2 CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib # We want to keep intermediate files -.PRECIOUS: %.elf %.o +.PRECIOUS: %.elf %.o %.aux.o asm-offsets = lib/$(ARCH)/asm-offsets.h include $(SRCDIR)/scripts/asm-offsets.mak diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common index b98f71c2f..16f14577e 100644 --- a/powerpc/Makefile.common +++ b/powerpc/Makefile.common @@ -30,7 +30,7 @@ CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib CFLAGS += -Wa,-mregnames # We want to keep intermediate files -.PRECIOUS: %.o +.PRECIOUS: %.o %.aux.o asm-offsets = lib/$(ARCH)/asm-offsets.h include $(SRCDIR)/scripts/asm-offsets.mak diff --git a/riscv/Makefile b/riscv/Makefile index 919a3ebb5..7207ff988 100644 --- a/riscv/Makefile +++ b/riscv/Makefile @@ -53,7 +53,7 @@ AUXFLAGS ?= 0x0 KEEP_FRAME_POINTER := y # We want to keep intermediate files -.PRECIOUS: %.elf %.o +.PRECIOUS: %.elf %.o %.aux.o define arch_elf_check = $(if $(shell ! $(READELF) -rW $(1) >&/dev/null && echo "nok"), diff --git a/s390x/Makefile b/s390x/Makefile index 23342bd64..d436c6e9a 100644 --- a/s390x/Makefile +++ b/s390x/Makefile @@ -85,7 +85,7 @@ CFLAGS += -fno-delete-null-pointer-checks LDFLAGS += -Wl,--build-id=none # We want to keep intermediate files -.PRECIOUS: %.o %.lds +.PRECIOUS: %.o %.aux.o %.lds asm-offsets = lib/$(ARCH)/asm-offsets.h include $(SRCDIR)/scripts/asm-offsets.mak