Skip to content

Commit 713dc36

Browse files
committed
✨ feat: add atomic for riscv64gc cpp
1 parent 1bcd40b commit 713dc36

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

tools/scripts/rules/rt.cpp.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2022-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file rt.cpp.lua
1717
--
1818
-- Change Logs:
@@ -36,6 +36,10 @@ do
3636

3737
target:add("ldflags", flags.ldflags_lib, {force = true})
3838
target:add("ldflags", "-lcxx", {force = true})
39+
40+
if config.arch() == "riscv64gc" then
41+
target:add("ldflags", "-latomic", {force = true})
42+
end
3943
end)
4044
end
4145
rule_end()

tools/scripts/toolchains/riscv64gc-unknown-smart-musl.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--
1313
-- Copyright (C) 2022-2023 RT-Thread Development Team
1414
--
15-
-- @author xqyjlj
15+
-- @author xqyjlj
1616
-- @file riscv64gc-unknown-smart-musl.lua
1717
--
1818
-- Change Logs:

0 commit comments

Comments
 (0)