[dpdk-kmods,v2] igb_uio: pass MODULE_CFLAGS in Kbuild

Message ID 20201111121626.156252-1-luca.boccassi@gmail.com (mailing list archive)
State Accepted, archived
Headers
Series [dpdk-kmods,v2] igb_uio: pass MODULE_CFLAGS in Kbuild |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation fail apply issues

Commit Message

Luca Boccassi Nov. 11, 2020, 12:16 p.m. UTC
  From: Luca Boccassi <bluca@debian.org>

With the legacy build system MODULE_CFLAGS can be set to pass compiler
flags specific for the kernel modules builds.
This is used currently by Ubuntu and Debian.
Set ccflags-y in the Kbuild to achieve the same result with Meson, and
to keep backward compatbility with older scripts.

Fixes regression in Ubuntu/Debian when the Kbuild is included in the
DKMS source package, as DKMS will pick it up silently by default if
present, causing the MODULE_CFLAGS to be ignored.

Fixes: a52f4574f798 ("igb_uio: build with meson")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
v2: backported original commit instead of making a new one

 linux/igb_uio/Kbuild | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Thomas Monjalon Nov. 11, 2020, 12:22 p.m. UTC | #1
11/11/2020 13:16, luca.boccassi@gmail.com:
> From: Luca Boccassi <bluca@debian.org>
> 
> With the legacy build system MODULE_CFLAGS can be set to pass compiler
> flags specific for the kernel modules builds.
> This is used currently by Ubuntu and Debian.
> Set ccflags-y in the Kbuild to achieve the same result with Meson, and
> to keep backward compatbility with older scripts.
> 
> Fixes regression in Ubuntu/Debian when the Kbuild is included in the
> DKMS source package, as DKMS will pick it up silently by default if
> present, causing the MODULE_CFLAGS to be ignored.
> 
> Fixes: a52f4574f798 ("igb_uio: build with meson")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> v2: backported original commit instead of making a new one

Applied with original commit date,
and simpler explanation from the v1
because meson/make history is not relevant in this repo.
  

Patch

diff --git a/linux/igb_uio/Kbuild b/linux/igb_uio/Kbuild
index 98c98fe..3ab85c4 100644
--- a/linux/igb_uio/Kbuild
+++ b/linux/igb_uio/Kbuild
@@ -1 +1,2 @@ 
+ccflags-y := $(MODULE_CFLAGS)
 obj-m := igb_uio.o