summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-09-22 00:06:43 +0800
committerGitHub <[email protected]>2022-09-22 00:06:43 +0800
commit1537b13549e12ed3787f387070aa3a774b5c63be (patch)
tree55991051ab0ba3c5fbb167a0aee65503bc35e0e8
parent8140d4c52c9627e58ab1eed5ac6402ee445c2155 (diff)
parent54770effaf705870d8b4a2c03c70c020a0463160 (diff)
Merge pull request #2852 from xmake-io/driver
Improve kernel driver
-rw-r--r--xmake/rules/platform/linux/driver/driver_modules.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/rules/platform/linux/driver/driver_modules.lua b/xmake/rules/platform/linux/driver/driver_modules.lua
index 4f2640c83..bf2a77c2c 100644
--- a/xmake/rules/platform/linux/driver/driver_modules.lua
+++ b/xmake/rules/platform/linux/driver/driver_modules.lua
@@ -108,7 +108,9 @@ module_exit(hello_exit);
end
local result, errors = try {function () return os.iorunv(make.program, argv, {curdir = tmpdir}) end}
if result then
- for _, line in ipairs(result:split("\n", {plain = true})) do
+ -- we can also split ';' for the muliple commands
+ for _, line in ipairs(result:split("[\n;]")) do
+ line = line:trim()
if line:endswith("stub.c") then
local include_cflag = false
for _, cflag in ipairs(line:split("%s+")) do
@@ -271,7 +273,7 @@ function link(target, opt)
-- generate target.mod.c
local orderfile = path.join(path.directory(targetfile_o), "modules.order")
local symversfile = path.join(path.directory(targetfile_o), "Module.symvers")
- argv = {"-m", "-a", "-o", symversfile, "-e", "-N", "-T", "-"}
+ argv = {"-m", "-a", "-o", symversfile, "-e", "-N", "-w", "-T", "-"}
io.writefile(orderfile, targetfile_o .. "\n")
os.vrunv(modpost, argv, {stdin = orderfile})