Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.198 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796172003; b=OLDX5d7fUlg9z81oOhl9dKPKags+NExJxy3GIcbnGgKy0+g5CIrDfn5pvBokkVYY8bC1 ZlrcA/483fdVpO8OxaxJe8ZPgVWbbPuPfqdgCZUwCCjX3JJgdEZh3yxd3IjkBg+GC/G/0 yxvg7+KYs9/0k7LusnmtEdkCEnptLylYA5mRsQE56rMZLVu4leqwVe2d9t1JVXv44jQwh uXnNJentFYbpVmBsAF74T0UDV2sBVuVKLqpesBZ4jPzftyqexZQ+3wHPPfF6KcDnrfEx/ 14lHDJFoW6mPhvK3hpmgBA2S8rnRAk5nh5vJ4+fRJqU7eaYayGC4p4+sqiku1BgaBxw== 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=1OmJQ8r8gUY0WPSsXtVuv9cKEy3w51K7+WOVxw0rBQIhSIMdNI4vE08tpPi6iHbWV1B/ tGuQvkHNeQkGbnos/zUwNwA0h+VHiMocY3jXSBrNsrTbqWWfWhO02Vz18kP5CJ4f07KPi L6ddK4906YsE/bZtXrNi0B6298XVSGwGbNnMETjG51C9VMTN0PEENMHfAw9dM9hAONcJj BA8yOWDTwBMl+uHOo2ECtQT7r6O9im8Y9IekI+msQDnLTAnrYCUfV3h52A6rYHKfS/drT CB9gPpY+GSuaqqd3KJ2izXGIcywinpM/m+J+DSZSmsKDIoXShuYTZwyEsCkkMjvktMg== 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.167.198 Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) (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 209D7606A69A for ; Wed, 2 Dec 2026 00:40:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 209D7606A69A 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-oi1-f198.google.com with SMTP id 5614622812f47-4a7de733fa9so12697649b6e.3 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=YUsuoerWEpSidELMwgH2TVJq4gSFH1922mUZsiUWd8Wx95xn53K04ZxE4pNdUh3MLf 1NQ5+un64574wYLaFcGI7uqAFt+uoWu805yEfmGNg14B9KM5SFfy1vpOce7lsC5MSL8Y MXpYCubdIKsqMnejo8aICrfv3XIOlodeHg1NDtjTiIh1aRD9fSMdNoCyEO4sLfQC6tB9 lrA7pTYcWuXiWTzCAZXNIgliR3RAjJrrKwL3yT6SK660vnV5d/X5Qxw5I5nc8Y+Bu51m /gY8rtBYpKYGP8brdWqjGh67rFUj9/2WW16avfH/jVuVmBgqeqixw4Wbe6kVbwc5gRfd +1KA== X-Forwarded-Encrypted: i=1; AL+hErEFmzR3vGIudPjSf4rGDw77dDIuQoO2ptcxco/C5s7T5LarwBhoo6gsF7fEkMEIFX9kF4DG/ua4YCfcecGcEyo=@vger.kernel.org X-Gm-Message-State: APuU4Z+csoOArjt7ipj8KZTJZqw/19n9BiovuI64BSAtiK5bb6VYnRIK 0Yd9GWQ+r/JGwXUv82squwsHXJRIbS7taKC1TJO0aKuGBKqVz/UzY/ex2BeZXcTaQoMRTeGTm3P IXGBGesM5+r8n9g== 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-kselftest@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