Support standalone riscv64 linux builds
GCC <13 requires linking libatomic for std::atomic<bool>.
Test: `tracebox sched` on HiFive Unmatched
Change-Id: I02ba9f6ea27751f666605b30c0644dd54852fe24
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
diff --git a/gn/standalone/BUILD.gn b/gn/standalone/BUILD.gn
index 1b23035..af6438a 100644
--- a/gn/standalone/BUILD.gn
+++ b/gn/standalone/BUILD.gn
@@ -258,6 +258,13 @@
"-mfpu=neon",
"-mthumb",
]
+ } else if (current_cpu == "riscv64") {
+ if (!is_clang) {
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104338
+ libs += [
+ "atomic",
+ ]
+ }
} else if (current_cpu == "x86") {
asmflags += [ "-m32" ]
cflags += [