Add gnu based static binary support

This commit is contained in:
crazywhalecc
2025-01-28 19:37:50 +08:00
parent f19e90afd7
commit 75ee69b07d
19 changed files with 201 additions and 18 deletions

View File

@@ -4,8 +4,16 @@ declare(strict_types=1);
namespace SPC\builder\unix\library;
use SPC\store\FileSystem;
trait bzip2
{
public function patchBeforeBuild(): bool
{
FileSystem::replaceFileStr($this->source_dir . '/Makefile', 'CFLAGS=-Wall', 'CFLAGS=-fPIC -Wall');
return true;
}
protected function build(): void
{
shell()->cd($this->source_dir)