Skip to contentSkip to conversation

igb_uio: pass MODULE_CFLAGS in new Kbuild

PATCH Superseded [email protected] 3 participants 4 messages May 1, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igb_uio: pass MODULE_CFLAGS in new Kbuild

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")
---
 kernel/linux/igb_uio/Kbuild | 1 +
 1 file changed, 1 insertion(+)
kernel/linux/igb_uio/Kbuild +1 -0
index 98c98fe52..3ab85c411 100644
@@ -1 +1,2 @@
+ccflags-y := $(MODULE_CFLAGS)
 obj-m := igb_uio.o
Signature · 1 line
2.14.2
Acked-by on v1 1/1
#1 lore raw
Quoted 33 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Tuesday, May 1, 2018 2:39 PM
To: [email protected]
Cc: Richardson, Bruce <[email protected]>; Luca Boccassi <[email protected]>; [email protected]
Subject: [PATCH] igb_uio: pass MODULE_CFLAGS in new Kbuild

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")
---
 kernel/linux/igb_uio/Kbuild | 1 +
 1 file changed, 1 insertion(+)
kernel/linux/igb_uio/Kbuild +0 -0
index 98c98fe52..3ab85c411 100644

kernel/linux/igb_uio/Kbuild line 2

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

PATCH v2 1/1 igb_uio: pass MODULE_CFLAGS in new 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: forgot --signed-off, added

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

01/05/2018 15:50, [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 5 lines
Fixes a52f4574f798 ("igb_uio: build with meson")

Applied, thanks