From b02472adabaeae71c2ee1d07de5b326960e49993 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 5 Jan 2022 22:13:43 +0800 Subject: Update driver_modules.lua --- xmake/rules/platform/linux/driver/driver_modules.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.3.1