From 100d31791a3e77162cb6e6c8e5d6f8354baaa410 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 22 Aug 2023 18:16:23 +0800 Subject: [PATCH] fix linux builder cpp link option --- src/SPC/builder/linux/LinuxBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/builder/linux/LinuxBuilder.php b/src/SPC/builder/linux/LinuxBuilder.php index 09d6fbdf..431fe490 100644 --- a/src/SPC/builder/linux/LinuxBuilder.php +++ b/src/SPC/builder/linux/LinuxBuilder.php @@ -134,7 +134,7 @@ class LinuxBuilder extends BuilderBase $extra_libs .= (empty($extra_libs) ? '' : ' ') . implode(' ', array_map(fn ($x) => "-Xcompiler {$x}", array_filter($this->getAllStaticLibFiles()))); } // add libstdc++, some extensions or libraries need it (C++ cannot be linked statically) - $extra_libs .= (empty($extra_libs) ? '' : ' ') . ($this->hasCppExtension() ? '-lc++ ' : ''); + $extra_libs .= (empty($extra_libs) ? '' : ' ') . ($this->hasCppExtension() ? '-lstdc++ ' : ''); $this->setOption('extra-libs', $extra_libs); $cflags = $this->arch_c_flags;