From ba2ee47135eb641c63d76a6f9e818ebadb375901 Mon Sep 17 00:00:00 2001 From: Redbeanw44602 Date: Mon, 27 Oct 2025 21:04:43 +0800 Subject: limit patch to clang based toolchains. --- xmake/modules/package/tools/autoconf.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index d5d48f500..5c791c461 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -284,6 +284,11 @@ function _apply_libtool_patch_for_cross(package, opt) return end + -- this patch is only needed for clang-based toolchains + if not package:has_tool("cxx", "clang", "zig_cc") then + return + end + -- detect the version of generated libtool script local libtool_version = find_programver("./libtool", {nocache = true}) if option.get("verbose") then @@ -342,7 +347,7 @@ function _apply_libtool_patch_for_cross(package, opt) local succeed = false for _, patch_version in ipairs(suitable_patch_versions) do if option.get("verbose") then - cprint("${dim}> try applying the patch ... ${color.success} %s", patch_version) + cprint("${dim}> try applying the patch ... ${color.success} >= %s", patch_version) end local patch_file = path.join(patch_dir, patch_version:shortstr() .. ".patch") local result = try { -- cgit v1.3.1