Skip to contentSkip to conversation

igb_uio: include MODULE_CFLAGS in Kbuild

PATCH Superseded [email protected] 2 participants 5 messages Oct 28, 2020 – Nov 11, 2020

lore
Share & tools
lore
#1 lore raw

28/10/2020 19:15, [email protected]:

Quoted 7 lines

From: Luca Boccassi <[email protected]>

Necessary to get build flags from DKMS.

See:

https://git.dpdk.org/dpdk/commit/?id=816d967717

[...]

linux/igb_uio/Kbuild line 2

Quoted 5 lines
linux/igb_uio/Kbuild +1 -0
@@ -1 +1,2 @@
+ccflags-y := $(MODULE_CFLAGS)
 obj-m := igb_uio.o

Yes this patch was not migrated because I though it was referring to a DPDK-specific variable.
So you mean MODULE_CFLAGS is from the kernel build system?

#2 lore raw
Quoted 9 lines · On Thu, 29 Oct 2020, 20:58 Thomas Monjalon, <[email protected]> wrote:

28/10/2020 19:15, [email protected]:

Quoted 7 lines

From: Luca Boccassi <[email protected]>

Necessary to get build flags from DKMS.

See:

https://git.dpdk.org/dpdk/commit/?id=816d967717

[...]

Quoted 10 lines

linux/igb_uio/Kbuild line 2

Quoted 5 lines
linux/igb_uio/Kbuild +1 -0
@@ -1 +1,2 @@
+ccflags-y := $(MODULE_CFLAGS)
 obj-m := igb_uio.o

Yes this patch was not migrated because I though it was referring to a DPDK-specific variable.
So you mean MODULE_CFLAGS is from the kernel build system?

Yeah dkms uses it

Quoted 1 line
#3 lore raw

PATCH v2 1/1 igb_uio: pass MODULE_CFLAGS in Kbuild

In reply to [email protected]

From: Luca Boccassi <[email protected]>

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")

---
v2: backported original commit instead of making a new one

 linux/igb_uio/Kbuild | 1 +
 1 file changed, 1 insertion(+)
linux/igb_uio/Kbuild +1 -0
index 98c98fe..3ab85c4 100644
@@ -1 +1,2 @@
+ccflags-y := $(MODULE_CFLAGS)
 obj-m := igb_uio.o
Signature · 1 line
2.27.0
#4 lore raw

Re: [dpdk-dev] [PATCH dpdk-kmods v2] igb_uio: pass MODULE_CFLAGS in Kbuild

11/11/2020 13:16, [email protected]:

Quoted 12 lines

From: Luca Boccassi <[email protected]>

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.

Quoted 7 lines
Fixes a52f4574f798 ("igb_uio: build with meson")

---
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.