From: Mike Pagano Date: Tue, 11 Jun 2019 15:07:09 +0000 (-0400) Subject: linux-mod.eclass: Add support for kernels >=3.X in convert_to_m X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b7410f4912aa4955067e2fef7c3938088a05bd88;p=gentoo.git linux-mod.eclass: Add support for kernels >=3.X in convert_to_m SUBDIRS= will be removed from Linux 5.3. See bug #680976 The linux-mod.eclass includes the function convert_to_m() that is supposed to fix Makefiles converting them from SUBDIRS= to M=. The auxiliary function use_m(), needed by convert_to_m(), is used to verify the kernel version before deciding to patch a file. Currently the check supports only kernel <= 3 Thanks to Fabio Rossi Signed-off-by: Mike Pagano --- diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index de005967a36c..b6dc2c84d09f 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -208,7 +208,7 @@ use_m() { # if the kernel version is greater than 2.6.6 then we should use # M= instead of SUBDIRS= - [ ${KV_MAJOR} -eq 3 ] && return 0 + [ ${KV_MAJOR} -ge 3 ] && return 0 [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -gt 5 -a ${KV_PATCH} -gt 5 ] && \ return 0 || return 1 }