Add gnu based static binary support

This commit is contained in:
crazywhalecc
2025-01-28 19:37:50 +08:00
committed by Marc Henderkes
parent 878e17ddb4
commit 09c0e43501
6 changed files with 30 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ trait pkgconfig
{
protected function build(): void
{
$cflags = PHP_OS_FAMILY !== 'Linux' ? '-Wimplicit-function-declaration -Wno-int-conversion' : '';
$cflags = PHP_OS_FAMILY !== 'Linux' ? "{$this->builder->arch_c_flags} -Wimplicit-function-declaration -Wno-int-conversion" : '';
$ldflags = !($this instanceof LinuxLibraryBase) || $this->builder->libc === 'glibc' ? '' : '--static';
shell()->cd($this->source_dir)