don't use -static, shared libraries cannot link against static musl libc and linking isn't done for static libraries yet

This commit is contained in:
henderkes 2025-10-06 21:37:36 +02:00
parent c4440668bb
commit 6c43fa55b1

View File

@ -7,7 +7,6 @@ namespace SPC\builder\unix\library;
use SPC\builder\linux\library\LinuxLibraryBase;
use SPC\exception\BuildFailureException;
use SPC\store\FileSystem;
use SPC\util\SPCTarget;
trait postgresql
{
@ -46,7 +45,7 @@ trait postgresql
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
if (!empty($output[1][0])) {
$ldflags = $output[1][0];
$envs .= SPCTarget::isStatic() ? " LDFLAGS=\"{$ldflags} -static\" " : " LDFLAGS=\"{$ldflags}\" ";
$envs .= " LDFLAGS=\"{$ldflags}\" ";
}
$output = shell()->execWithResult("pkg-config --libs-only-l --static {$packages}");
$error_exec_cnt += $output[0] === 0 ? 0 : 1;