pass proper optimization flags to a few libs that ignored them

This commit is contained in:
henderkes
2026-05-02 20:04:02 +07:00
parent b72b734bbe
commit 20030096d6
4 changed files with 21 additions and 4 deletions

View File

@@ -10,7 +10,8 @@ trait bzip2
{
public function patchBeforeBuild(): bool
{
FileSystem::replaceFileStr($this->source_dir . '/Makefile', 'CFLAGS=-Wall', 'CFLAGS=-fPIC -Wall');
$extra = trim((string) getenv('SPC_DEFAULT_C_FLAGS'));
FileSystem::replaceFileStr($this->source_dir . '/Makefile', 'CFLAGS=-Wall', "CFLAGS=-Wall {$extra}");
return true;
}