mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-10 02:15:36 +08:00
Update src/SPC/builder/unix/library/jbig.php
Co-authored-by: Jerry Ma <jesse2061@outlook.com>
This commit is contained in:
@@ -12,13 +12,18 @@ trait jbig
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @throws FileSystemException
|
* @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
|
* @throws RuntimeException
|
||||||
*/
|
*/
|
||||||
protected function build(): void
|
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
|
// Build the library
|
||||||
shell()->cd($this->source_dir)->initializeEnv($this)
|
shell()->cd($this->source_dir)->initializeEnv($this)
|
||||||
->exec("make -j{$this->builder->concurrency} {$this->builder->getEnvString()} lib")
|
->exec("make -j{$this->builder->concurrency} {$this->builder->getEnvString()} lib")
|
||||||
|
|||||||
Reference in New Issue
Block a user