From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.72 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796172003; b=BjJFJRD5GLY7aj3pBTWZiOaAvNy+nxKPGQDZsAHZ40BrhzOQKENt3//Awk2xsGqjq88x FzL1+j5bS6oq4lcAtunRmAE5Ga4j5vCvAJji0vM83Sh6eK2fDIG3RyaGKz3IWFj9knT3A u9bn/Oew+X7wosKCklKVf98w+k91/A46XJGAd9nuBERRITQJLwXP56jyS7KgQguSIbQuM DKjCJpAmqEMsTVdP7M0Gb8r6lzXZGH2dCJVWInKUAwkDr7LdeXB4EKbyCY6Hz/dZEp7xT TI93FLkt5ee3QtQJKn3o5RiKc6EEBUFwZj7guuct990qwrdYw9lIp6HtEtXszVCjWag== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796172003; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=43Iit3IWV1Iw56A/lAmfjsB6VdP5DsVPwlhQLf9aGf4=; b=lIj0w6FHXrMDfdmRIJEn0gJpmP3H9roYXbrSyVBM2BbZ7HYkhzk74om8jQUMbtIE2GQN YQUhT8um60jMA2uvYCxpVUS5eUFJKmpKbD57azhTnyao6HnNr/ifvgx6D7dDnV2jdQfPH UkcOMZwEijXGAq592ZDHmnzNCFAVgc9W1QGnbvjBTU9IY5U3vRYceJEDe/tDLmR3T8qyq CbuvgZDciHDRMfiYmvIK7WcCN9WQCZRF0Qx86ZeQE7sfWktUyc4xnczgYbY04F5veywmM 5CzYhOpHyAK5Y2HBuEAxnmEteFJDyWsuURIdpzQPL0tON2ZrqsvyL218aUETxXmpbUg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--dmatlack.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=kYICsERX; arc=none smtp.remote-ip=209.85.210.72 Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B830606A699 for ; Wed, 2 Dec 2026 00:40:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1B830606A699 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--dmatlack.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=kYICsERX Received: by mail-ot1-f72.google.com with SMTP id 46e09a7af769-862c4207de6so13090801a34.0 for ; Tue, 01 Dec 2026 16:40:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796172002; x=1796776802; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=43Iit3IWV1Iw56A/lAmfjsB6VdP5DsVPwlhQLf9aGf4=; b=kYICsERXl2x1RUQmgBLDYjSXPxItuJoZ3c9xOU0VN69hmcY0Iy3cgNgCLW/bJKjQ4/ 8uSo8PcWxvEcgE6qJFKQH3LktWngRQTw45mkKsoWwixMiAmxEWkivx3o6V02R66Gn4U3 /i6Oi73hoPCQuZyX05ZIheFCD3Eh6YtMKxPVbuilLo5oCLYTtnp6/tEHmkMZg6Ktz8fn dYjhFHDsuRYLXKMJGyTPYYcEoclPo9xC0Kk6xY1GomN3lvDI/A7xi3u9apDT1qWhk0aM R7gBhKR+yWOhxqDtR1nvInrkcsAUrZ9BLRFyLcXJmfo9wE9JEm75CXwbEUZLXuXvK97v dwyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796172002; x=1796776802; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=43Iit3IWV1Iw56A/lAmfjsB6VdP5DsVPwlhQLf9aGf4=; b=y2co5T6l/vVvQp+3Q3R4d7cYNFyIod8xlKKqldUvOMHXdikIhYyIHlFG9NBu/XDd7q MTL96HkZf3kG7QN/IHamXSgvZHdVnaKAfI3OwoawD8mr6nmrVMLv6x4/CUnSBVcbapmm UWhEQS7w/vEOScexNcrCo0DPEiz3rC7iEov00p+jD16E61Okwi8NKGDjkNm2w7C/w84A RoDTJwuhZcolk5hM1ue5io42d3380cAhs7/rw0aA3NV63D7MAmCvQHVaRxEZMB1V+vxj ED5LdnYuBfxF/C1yfRyAGwnRcJQc9J2gtdkNHIYnl1l1Zl7ukN2Rd5yKVNikHuxgh8UB 5KhA== X-Forwarded-Encrypted: i=1; AL+hErGpTbsSEFjprbzVvj1GANYJFdp4VKan3pJeFxplccHnf1bT9Jfvv8imLOoiRU11bTMovVi6MD1s5jV2RRE=@vger.kernel.org X-Gm-Message-State: APuU4Z9r3iU5RCfgGV0+H7pkpNRAG+S8Xten9eTMqnxFGi7F4/sbPNrO uGTpLuVr2rtX8MS8D+w1CyrXdFB9wGZCWQByDem+gQ9V6mW7cHhOrdpawV42EZgZfQOVEf4p1zJ cV+MMYsIF9tn1mg== X-Received: from ilbej4-n2.prod.google.com ([2002:a05:6e02:4e04:20b0:543:4359:a143]) (user=dmatlack job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6808:10c1:b0:575:d57b:6f54 with SMTP id 5614622812f47-57a0771508cmr42175856b6e.5.1796172001841; Tue, 01 Dec 2026 16:40:01 -0800 (PST) Date: Wed, 2 Dec 2026 00:39:40 +0000 In-Reply-To: <20261202003955.3607156-1-dmatlack@google.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261202003955.3607156-1-dmatlack@google.com> X-Mailer: git-send-email 2.56.1.911.g883d8bcb20-goog Message-ID: <20261202003955.3607156-4-dmatlack@google.com> Subject: [PATCH 03/18] selftests/liveupdate: Build objects in $(OUTPUT) From: David Matlack To: kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-pci@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Albert Ou , Alexandre Ghiti , Alex Williamson , Bjorn Helgaas , David Matlack , Jacob Pan , Jason Gunthorpe , Josh Hilke , Lukas Wunner , Mike Rapoport , Palmer Dabbelt , Parav Pandit , Pasha Tatashin , Paul Walmsley , Pranjal Shrivastava , Pratyush Yadav , Samiullah Khawaja , Shuah Khan , Vipin Sharma Content-Type: text/plain; charset="UTF-8" Build the objects of the test programs in $(OUTPUT), next to the programs, rather than in the source directory. The programs depend on %.o, which is relative to the source directory, so make builds the objects there with its implicit rule even when building with O= or OUTPUT=. Make the programs depend on $(OUTPUT)/%.o instead, and add an explicit rule for it that also creates the object's directory, so that programs can live in subdirectories. Signed-off-by: David Matlack --- tools/testing/selftests/liveupdate/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/liveupdate/Makefile b/tools/testing/selftests/liveupdate/Makefile index 634211c66652..31517a07f531 100644 --- a/tools/testing/selftests/liveupdate/Makefile +++ b/tools/testing/selftests/liveupdate/Makefile @@ -23,7 +23,11 @@ TEST_DEP_FILES := $(patsubst %.o, %.d, $(LIBLIVEUPDATE_O)) TEST_DEP_FILES += $(patsubst %.o, %.d, $(TEST_O)) -include $(TEST_DEP_FILES) -$(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): $(OUTPUT)/%: %.o $(LIBLIVEUPDATE_O) +$(TEST_O): $(OUTPUT)/%.o: %.c + $(Q)mkdir -p $(@D) + $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ + +$(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): $(OUTPUT)/%: $(OUTPUT)/%.o $(LIBLIVEUPDATE_O) $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $< $(LIBLIVEUPDATE_O) $(LDLIBS) -o $@ EXTRA_CLEAN += $(TEST_O) -- 2.56.1.911.g883d8bcb20-goog