Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp736621ybc; Sat, 16 Nov 2019 07:49:11 -0800 (PST) X-Google-Smtp-Source: APXvYqxHpt9487H5e9PD/14DXHhIckJ7dfYaNNCzRZRMoOK8tiUPYmL04peQT+xEb8lg85m+UQTa X-Received: by 2002:a17:906:fcdb:: with SMTP id qx27mr10586853ejb.255.1573919351221; Sat, 16 Nov 2019 07:49:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573919351; cv=none; d=google.com; s=arc-20160816; b=w3r9VoNAnwj8ZnpmTlJ6UbUoD9TpIHbaT11aoeugyB+53kGsmQDJORfmuJuWw8ZrTY hmFlovZspRu4eLHnI8OceGztHQsq7VxzQHXDk7b/75neWSFOf+N+Td2zARXKaMKkDuTJ A2vWf2t48dh4F6Yr+hLtRNkugYQzzbodTbs1+Plh+wvYutteMJcyp4Zf915eLnRmM19h 9WvYPptrDfeBFD925MtdMj/AIkwid1gkAcaVuUDNVlTpe8kEunEDrY+BBiwwMdK4zGIC WitueWwQjIrEjbmaH+ttztsJ9NMMIIM9G2bgWKKAsJ8MST9H1JTbtNlCBTSXL1gCS/Fo 0Uwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Mxdtb8HSF0ZRCZUpniABSnvtbJK6m8s8oBP+mfHbUfU=; b=j1p8Pd4KSSZErbPwhzPodAdUyk2LK7u6kbgbs0YFxJI+3w8n4K1SjNI3ummO6DBDs9 XEOL9Rl+P7l6be5H/GjTGoaCfvheAMqkyxev7ckyKsGathufhMJaInPSDo3F6gHB0t+/ MvOGIGFy5ZUYXW5SRtQtC+YoClLo7LJpsT0c+QNqenVKAS+sDqUiUitvbtcdzklI8bwu VluVwCV2QOPjmC7eiY1Y+Yik8/f7W9o64QSzu2ccHTGSBzoDuDAG/wkbHQC4ZVQKBIFb PARtu/tA0xddR8sRfOVqUvNKgJrsoJ47lHN/AlKqCNUG4E6xiQMeymBBIiCVvgNnIpk8 poYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wP1CN14D; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e32si9402469eda.267.2019.11.16.07.48.46; Sat, 16 Nov 2019 07:49:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wP1CN14D; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729048AbfKPPol (ORCPT + 99 others); Sat, 16 Nov 2019 10:44:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:49572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728057AbfKPPog (ORCPT ); Sat, 16 Nov 2019 10:44:36 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D69572072D; Sat, 16 Nov 2019 15:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919076; bh=8NzhWQdmgAYi75Syl7w/F0X2VA0psKoEI0KYAzgnHuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wP1CN14DuR/OInosbLHgXDP39KEfTauAt26bPWm5p+LR3kI7VE2jbOO/fO/zun0du Hp56NamJRhF3sDFplqkEaBq8L1Y0hcWc77t6KrFHhR6DUts2rb7Vn9wuI6qb3YUdwJ ErLnNV0fGc8tzgeuM/rxqDKuRauK7c1GPvNEgcec= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Joel Stanley , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org, linux-kselftest@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 144/237] selftests/powerpc/ptrace: Fix out-of-tree build Date: Sat, 16 Nov 2019 10:39:39 -0500 Message-Id: <20191116154113.7417-144-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joel Stanley [ Upstream commit c39b79082a38a4f8c801790edecbbb4d62ed2992 ] We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests makefile (lib.mk) that those tests are generated (built), and so it adds the $(OUTPUT) prefix for us, making the out-of-tree build work correctly. It also means we don't need our own clean rule, lib.mk does it. We also have to update the ptrace-pkey and core-pkey rules to use $(OUTPUT). Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- tools/testing/selftests/powerpc/ptrace/Makefile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile index 923d531265f8c..9f9423430059e 100644 --- a/tools/testing/selftests/powerpc/ptrace/Makefile +++ b/tools/testing/selftests/powerpc/ptrace/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \ +TEST_GEN_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \ ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \ ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \ perf-hwbreak @@ -7,14 +7,9 @@ TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \ top_srcdir = ../../../../.. include ../../lib.mk -all: $(TEST_PROGS) - CFLAGS += -m64 -I../../../../../usr/include -I../tm -mhtm -fno-pie -ptrace-pkey core-pkey: child.h -ptrace-pkey core-pkey: LDLIBS += -pthread - -$(TEST_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h +$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: child.h +$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread -clean: - rm -f $(TEST_PROGS) *.o +$(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h -- 2.20.1