mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 21:34:53 +08:00
Update src/SPC/builder/unix/library/jbig.php
Co-authored-by: Jerry Ma <jesse2061@outlook.com>
This commit is contained in:
parent
c7762a5b65
commit
6c109c52f6
@ -12,13 +12,18 @@ trait jbig
|
||||
{
|
||||
/**
|
||||
* @throws FileSystemException
|
||||
*/
|
||||
public function patchBeforeBuild(): bool
|
||||
{
|
||||
// Patch Makefile to add -fPIC flag for position-independent code
|
||||
FileSystem::replaceFileStr($this->source_dir . '/Makefile', 'CFLAGS = -O2 -W -Wno-unused-result', 'CFLAGS = -O2 -W -Wno-unused-result -fPIC');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
protected function build(): void
|
||||
{
|
||||
// Patch Makefile to add -fPIC flag for position-independent code
|
||||
FileSystem::replaceFileStr($this->source_dir . '/Makefile', 'CFLAGS = -O2 -W -Wno-unused-result', 'CFLAGS = -O2 -W -Wno-unused-result -fPIC');
|
||||
|
||||
// Build the library
|
||||
shell()->cd($this->source_dir)->initializeEnv($this)
|
||||
->exec("make -j{$this->builder->concurrency} {$this->builder->getEnvString()} lib")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user