From 0d27288609dbebca431d2be7c79397a14ab7d84c Mon Sep 17 00:00:00 2001 From: Shaun Tancheff Date: Tue, 13 Aug 2019 15:36:47 -0500 Subject: [PATCH] LU-12634 build: kbuild changes in 5.3 drop subdir-m Several changes in kbuild affect the way external modules can be built. In the Linux 5.3-rc4 series subdir-m has been removed. Linux commit: c07d8d47bca1b325102fa2be3a463075f7b051d9 Test-Parameters: trivial Cray-bug-id: LUS-7689 Signed-off-by: Shaun Tancheff Change-Id: Id1f248ac4ccdee8d2a2d177b4fdff4444d2084d1 Reviewed-on: https://review.whamcloud.com/35786 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- .gitignore | 1 + Makefile.in | 4 ++-- build/Rules.in | 2 +- libcfs/Makefile.in | 2 +- lnet/Makefile.in | 8 ++++---- lnet/klnds/Makefile.in | 6 +++--- lustre/Makefile.in | 20 ++++++++++---------- lustre/autoconf/lustre-core.m4 | 2 +- lustre/ptlrpc/Makefile.in | 2 +- 9 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 9759ce3..b33e8fd 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,4 @@ cscope.* # doxygen files doxygen.* +*.mod diff --git a/Makefile.in b/Makefile.in index f78db0c..76cb6e9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -subdir-m += @LDISKFS_SUBDIR@ @LIBCFS_SUBDIR@ lnet -subdir-m += lustre +obj-m += @LDISKFS_SUBDIR@/ @LIBCFS_SUBDIR@/ lnet/ +obj-m += lustre/ @INCLUDE_RULES@ diff --git a/build/Rules.in b/build/Rules.in index 7ab1f61..38f5e14 100644 --- a/build/Rules.in +++ b/build/Rules.in @@ -36,6 +36,6 @@ EXTRA_CFLAGS += $(EXTRA_POST_CFLAGS) KBUILD_EXTRA_SYMBOLS += @EXTRA_SYMBOLS@ -obj-m := $(patsubst %,%.o,$(MODULES)) +obj-m += $(patsubst %,%.o,$(MODULES)) endif # PATCHLEVEL diff --git a/libcfs/Makefile.in b/libcfs/Makefile.in index 8c58d42..92c7b4e 100644 --- a/libcfs/Makefile.in +++ b/libcfs/Makefile.in @@ -1,3 +1,3 @@ -subdir-m += libcfs +obj-m += libcfs/ @INCLUDE_RULES@ diff --git a/lnet/Makefile.in b/lnet/Makefile.in index 9d25495..ae325de 100644 --- a/lnet/Makefile.in +++ b/lnet/Makefile.in @@ -1,7 +1,7 @@ -lnet-subdirs += lnet -lnet-subdirs += klnds -lnet-subdirs += selftest -subdir-m += $(lnet-subdirs) +lnet-subdirs += lnet/ +lnet-subdirs += klnds/ +lnet-subdirs += selftest/ +obj-m += $(lnet-subdirs) @INCLUDE_RULES@ diff --git a/lnet/klnds/Makefile.in b/lnet/klnds/Makefile.in index 6fc3744..d968d82 100644 --- a/lnet/klnds/Makefile.in +++ b/lnet/klnds/Makefile.in @@ -1,5 +1,5 @@ -@BUILD_GNILND_TRUE@subdir-m += gnilnd -@BUILD_O2IBLND_TRUE@subdir-m += o2iblnd -subdir-m += socklnd +@BUILD_GNILND_TRUE@obj-m += gnilnd/ +@BUILD_O2IBLND_TRUE@obj-m += o2iblnd/ +obj-m += socklnd/ @INCLUDE_RULES@ diff --git a/lustre/Makefile.in b/lustre/Makefile.in index 319a405..4f046a9 100644 --- a/lustre/Makefile.in +++ b/lustre/Makefile.in @@ -1,14 +1,14 @@ -subdir-m += fid -subdir-m += obdclass -subdir-m += ptlrpc -subdir-m += obdecho -subdir-m += mgc -subdir-m += tests/kernel +obj-m += fid/ +obj-m += obdclass/ +obj-m += ptlrpc/ +obj-m += obdecho/ +obj-m += mgc/ +obj-m += tests/kernel/ -@SERVER_TRUE@subdir-m += ost mgs mdt mdd ofd quota osp lod lfsck -@CLIENT_TRUE@subdir-m += lov osc mdc lmv llite fld -@LDISKFS_ENABLED_TRUE@subdir-m += osd-ldiskfs -@ZFS_ENABLED_TRUE@subdir-m += osd-zfs +@SERVER_TRUE@obj-m += ost/ mgs/ mdt/ mdd/ ofd/ quota/ osp/ lod/ lfsck/ +@CLIENT_TRUE@obj-m += lov/ osc/ mdc/ lmv/ llite/ fld/ +@LDISKFS_ENABLED_TRUE@obj-m += osd-ldiskfs/ +@ZFS_ENABLED_TRUE@obj-m += osd-zfs/ @OSDADDON@ @INCLUDE_RULES@ diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 79d8e8b..89e2141 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -3166,7 +3166,7 @@ AS_IF([test $ENABLEOSDADDON -eq 0], [ OSDADDON="" ], [ln -s $OSDADDON $LUSTRE/$OSDMODNAME], [ AC_MSG_RESULT([$OSDMODNAME]) - OSDADDON="subdir-m += $OSDMODNAME" + OSDADDON="obj-m += $OSDMODNAME/" ], [ AC_MSG_RESULT([can't link]) OSDADDON="" diff --git a/lustre/ptlrpc/Makefile.in b/lustre/ptlrpc/Makefile.in index a02ecb5..3cb1fb8 100644 --- a/lustre/ptlrpc/Makefile.in +++ b/lustre/ptlrpc/Makefile.in @@ -31,7 +31,7 @@ nodemap_objs += nodemap_storage.o ptlrpc-objs := $(ldlm_objs) $(ptlrpc_objs) $(TARGET)barrier.o @SERVER_TRUE@ptlrpc-objs += $(target_objs) $(nodemap_objs) -@GSS_TRUE@subdir-m += gss +@GSS_TRUE@obj-m += gss/ default: all -- 1.8.3.1