From d48c84d81b80fe075e30c8ad86e5b32621dab859 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Tue, 19 Aug 2025 10:27:52 +0700 Subject: [PATCH] move -lstdc++ to the end of the libraries --- src/SPC/util/SPCConfigUtil.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/SPC/util/SPCConfigUtil.php b/src/SPC/util/SPCConfigUtil.php index 17c5c500..86d197c8 100644 --- a/src/SPC/util/SPCConfigUtil.php +++ b/src/SPC/util/SPCConfigUtil.php @@ -80,9 +80,7 @@ class SPCConfigUtil } if ($this->builder->hasCpp()) { $libcpp = SPCTarget::getTargetOS() === 'Darwin' ? '-lc++' : '-lstdc++'; - if (!str_contains($libs, $libcpp)) { - $libs .= " {$libcpp}"; - } + $libs = str_replace($libcpp, '', $libs) . " {$libcpp}"; } if ($this->libs_only_deps) {