From 817b94760ef9b0a0b0c84fccb1191f761e389f6c Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 14 Feb 2021 21:30:05 +0800 Subject: [PATCH] fix muslcc --- packages/m/muslcc/xmake.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/m/muslcc/xmake.lua b/packages/m/muslcc/xmake.lua index fa493b454..8e7078211 100644 --- a/packages/m/muslcc/xmake.lua +++ b/packages/m/muslcc/xmake.lua @@ -51,6 +51,12 @@ package("muslcc") on_install("@windows", "@linux", "@macosx", function (package) os.tryrm("usr") -- remove soft link os.vcp("*", package:installdir()) + if package:is_plat("macosx") then + -- fix missing libisl.22.dylib + if not os.isfile("/usr/local/opt/isl/lib/libisl.22.dylib") then + os.vcp("/usr/local/opt/isl/lib/libisl.21.dylib", path.join(package:installdir("lib"), "libisl.22.dylib")) + end + end end) on_test(function (package) @@ -67,5 +73,7 @@ package("muslcc") if gcc and is_host("windows") then gcc = gcc .. ".exe" end - os.vrunv(gcc, {"--version"}) + local file = os.tmpfile() .. ".c" + io.writefile(file, "int main(int argc, char** argv) {return 0;}") + os.vrunv(gcc, {"-c", file}) end)