From patchwork Sun Dec 3 10:14:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13477226 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF34928FE; Sun, 3 Dec 2023 10:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NmJ1avpb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68FB5C433C7; Sun, 3 Dec 2023 10:14:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701598465; bh=SGw12HvAh6TeQkpp7+yNIE4rnwWaTLqwCH5qBGJLnPo=; h=From:To:Cc:Subject:Date:From; b=NmJ1avpbXG/IdCjt2tV9705sdIZXNYxaRNYb0NrLDWYjC2HRPhwatyCll0V5oRvIC LRcqvi1UI1OApssEtcpQgzI5myhiaDRfGWy9iHvusH5/eFZFyM8WP21OerrNKTtflB k1edi6XjHZFpY4Rh3JzXO7EFua+u/OtTZeTowPwFn5mXQFSkTfHDLGmmjQCkN2Zriz jGLr344AvH2DLlh9vvhYOWDrKZIZeDNCOcrWtOCPrC6788/UTmfAqP+ptVgZDpcYD9 scHM14/olcPuel7rjRcG4MlezAJszmFQBcTgGVGSqtmpA0bLOKUXduV8agxgo3ALUk tb3irtm0FktYQ== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , "David S. Miller" , linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org Subject: [PATCH 1/3] sparc: vdso: clean up build artifacts in arch/sparc/vdso/ Date: Sun, 3 Dec 2023 19:14:16 +0900 Message-Id: <20231203101418.1910661-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Currently, vdso-image-*.c, vdso*.so, vdso*.so.dbg are not cleaned because 'make clean' does not include include/config/auto.conf, resulting in $(vdso_img-y) being empty. Add the build artifacts to 'targets' unconditionally. Signed-off-by: Masahiro Yamada Acked-by: Sam Ravnborg --- arch/sparc/vdso/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile index d08c3a0443f3..eb52d0666ffc 100644 --- a/arch/sparc/vdso/Makefile +++ b/arch/sparc/vdso/Makefile @@ -24,11 +24,8 @@ targets += vdso.lds $(vobjs-y) # Build the vDSO image C files and link them in. vdso_img_objs := $(vdso_img-y:%=vdso-image-%.o) -vdso_img_cfiles := $(vdso_img-y:%=vdso-image-%.c) -vdso_img_sodbg := $(vdso_img-y:%=vdso%.so.dbg) obj-y += $(vdso_img_objs) -targets += $(vdso_img_cfiles) -targets += $(vdso_img_sodbg) $(vdso_img-y:%=vdso%.so) +targets += $(foreach x, 32 64, vdso-image-$(x).c vdso$(x).so vdso$(x).so.dbg) CPPFLAGS_vdso.lds += -P -C From patchwork Sun Dec 3 10:14:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13477227 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D897728FE; Sun, 3 Dec 2023 10:14:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iV9ihJQ5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1361C433CA; Sun, 3 Dec 2023 10:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701598466; bh=rjTEorOKOasXmLsA7k46njF60U2EzdHdA3xtay0TA6w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iV9ihJQ5p1xKzK8ySsg8JXWHcEecEpA1RX9Fvd73XsKS6JgW9SjvRSh/waEcC8Mqt hMB6WklR0jm3+7NQBemBJInVupiZfbolUzX3vHTj29b/Agf2NZKgbh2aBb4Iloo7AH DSoslmN4dUJ1PS4Lc5baA05psWDIvsOJk4CuoZphaf3WIgKQ7b9dH+Qjk0VZ/fTSrh yyVBAmfMqWyp5xt4HcW05xWDgfh8qn/aZeLkYqCU4ziBwRS8SZmLFg20f62jL9JsxO OmsA/o1Amqbs2HG/SEEc/MDxiaieHp/RhFfglXTTLpn7aKm5e4GXjtkNNOM00OtVP0 N77fJzoP/ZQRw== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , "David S. Miller" , linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org Subject: [PATCH 2/3] sparc: vdso: simplify obj-y addition Date: Sun, 3 Dec 2023 19:14:17 +0900 Message-Id: <20231203101418.1910661-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231203101418.1910661-1-masahiroy@kernel.org> References: <20231203101418.1910661-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add objects to obj-y in a more straightforward way. Signed-off-by: Masahiro Yamada --- arch/sparc/vdso/Makefile | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile index eb52d0666ffc..03a32b6156ee 100644 --- a/arch/sparc/vdso/Makefile +++ b/arch/sparc/vdso/Makefile @@ -3,9 +3,6 @@ # Building vDSO images for sparc. # -VDSO64-$(CONFIG_SPARC64) := y -VDSOCOMPAT-$(CONFIG_COMPAT) := y - # files to link into the vdso vobjs-y := vdso-note.o vclock_gettime.o @@ -13,18 +10,14 @@ vobjs-y := vdso-note.o vclock_gettime.o obj-y += vma.o # vDSO images to build -vdso_img-$(VDSO64-y) += 64 -vdso_img-$(VDSOCOMPAT-y) += 32 +obj-$(CONFIG_SPARC64) += vdso-image-64.o +obj-$(CONFIG_COMPAT) += vdso-image-32.o vobjs := $(foreach F,$(vobjs-y),$(obj)/$F) $(obj)/vdso.o: $(obj)/vdso.so targets += vdso.lds $(vobjs-y) - -# Build the vDSO image C files and link them in. -vdso_img_objs := $(vdso_img-y:%=vdso-image-%.o) -obj-y += $(vdso_img_objs) targets += $(foreach x, 32 64, vdso-image-$(x).c vdso$(x).so vdso$(x).so.dbg) CPPFLAGS_vdso.lds += -P -C From patchwork Sun Dec 3 10:14:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13477228 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D5CC28FE; Sun, 3 Dec 2023 10:14:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ANc3f6u9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DE71C433C8; Sun, 3 Dec 2023 10:14:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701598468; bh=y6guoQ7JWLb6nFfFVlYe/P/b7whl0hnphrJFPbci+gk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ANc3f6u9EJ1ssuxlufhHFIfCJXuS+5oWXzSwIs67To6kWkn4rM1AnGhiZ8OET+DzD BJ0ThA4/ZrHd8ZdZuOP7SgL+PaY62RFymEtlgn6DvuxLngtM/RcjMGvia/dCb5GAY2 xRIWJGXwJpWSBf9S1v38Ux5kfOPwOvoNc5tBznfjUbCEnViqTDZSXeVp0UBfvNiC6o G2JoRJPw9ZkD8Cka9somYHgg4zMQmsyHtvMuIKNySqyOxNtB4HuegMnJnqD2pR1O40 DBUYwHtlTBHiDQ0ECMWhWsSHnZ26BNrN8+Vcj7yl3mqVlC5iN5fD91fWFJqnYorXBW OID75cthdk4VA== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , "David S. Miller" , linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org Subject: [PATCH 3/3] sparc: vdso: use $(addprefix ) instead of $(foreach ) Date: Sun, 3 Dec 2023 19:14:18 +0900 Message-Id: <20231203101418.1910661-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231203101418.1910661-1-masahiroy@kernel.org> References: <20231203101418.1910661-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 $(addprefix ) is slightly shorter and more intuitive. Signed-off-by: Masahiro Yamada --- arch/sparc/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile index 03a32b6156ee..7f5eedf1f5e0 100644 --- a/arch/sparc/vdso/Makefile +++ b/arch/sparc/vdso/Makefile @@ -13,7 +13,7 @@ obj-y += vma.o obj-$(CONFIG_SPARC64) += vdso-image-64.o obj-$(CONFIG_COMPAT) += vdso-image-32.o -vobjs := $(foreach F,$(vobjs-y),$(obj)/$F) +vobjs := $(addprefix $(obj)/, $(vobjs-y)) $(obj)/vdso.o: $(obj)/vdso.so