fix:ldflags -ldl for earlier glibc version

This commit is contained in:
luoliwoshang
2025-09-06 18:56:58 +08:00
parent f41badde20
commit 054591c279

View File

@@ -326,7 +326,9 @@ func use(goos, goarch string, wasiThreads bool) (export Export, err error) {
"--gc-sections", "--gc-sections",
"-lm", "-lm",
"-latomic", "-latomic",
"-lpthread", // libpthread is built-in since glibc 2.34 (2021-08-01); we need to support earlier versions. // libpthread & libdl is built-in since glibc 2.34 (2021-08-01); we need to support earlier versions.
"-lpthread",
"-ldl",
) )
} }
return return