File 0019-LU-14195-build-Adjust-Makefile-for-Linux-build-chang.patch of Package lustre_2_12

From 197f8f09f20a46dcb9c1c98a16700ec333d6c249 Mon Sep 17 00:00:00 2001
From: Mr NeilBrown <neilb@suse.de>
Date: Wed, 9 Dec 2020 11:28:16 +1100
Subject: [PATCH 19/35] LU-14195 build: Adjust Makefile for Linux build
 changes.

Since v5.10-rc1~51^2~19, "KBUILD_BUILTIN" has been unset
for module builds.  This means that "targets-for-builtin"
isn't built, and that is how "extra-y" is built.

So we need another way to force LUSTRE_KERNEL_TEST to be built.

Since v5.6-rc1~1^2~5 any target listed in "always-y" will always get
built.  So we can assign LUSTRE_KERNEL_TEST to this macro.

Assigning both macros is safe, even for those kernels which include
both in the list of targets.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I508b3710579c068dec93baf81ee383f3f03bd370
Reviewed-on: https://review.whamcloud.com/40907
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
---
 build/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/build/Makefile b/build/Makefile
index d732afcd0312..5304d7a2f9c1 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -32,7 +32,10 @@ else # PATCHLEVEL
 
 # case #3
 ifneq ($(LUSTRE_KERNEL_TEST),)
+# extra-y works prior to 5.10
 extra-y = $(LUSTRE_KERNEL_TEST)
+# always-y works since 5.6
+always-y = $(LUSTRE_KERNEL_TEST)
 endif
 
 obj-m := conftest.o
-- 
2.41.0

openSUSE Build Service is sponsored by