fix last libs to use cflags

This commit is contained in:
henderkes
2026-05-04 20:00:25 +07:00
parent bcafd9c962
commit 6557fc9d7e
3 changed files with 6 additions and 2 deletions

View File

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