summaryrefslogtreecommitdiff
path: root/xmake/rules/platform/linux/driver/driver_modules.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/platform/linux/driver/driver_modules.lua')
-rw-r--r--xmake/rules/platform/linux/driver/driver_modules.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/rules/platform/linux/driver/driver_modules.lua b/xmake/rules/platform/linux/driver/driver_modules.lua
index 69a51d80d..a333f5f6e 100644
--- a/xmake/rules/platform/linux/driver/driver_modules.lua
+++ b/xmake/rules/platform/linux/driver/driver_modules.lua
@@ -115,7 +115,7 @@ module_exit(hello_exit);
local has_cflag = false
if cflag:startswith("-f") or cflag:startswith("-m")
or (cflag:startswith("-W") and not cflag:startswith("-Wp,-MMD,") and not cflag:startswith("-Wp,-MD,"))
- or (cflag:startswith("-D") and not cflag:startswith("-DKBUILD_")) then
+ or (cflag:startswith("-D") and not cflag:find("KBUILD_MODNAME=") not cflag:find("KBUILD_BASENAME=")) then
has_cflag = true
elseif cflag == "-I" or cflag == "-isystem" or cflag == "-include" then
include_cflag = cflag