mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 05:14:52 +08:00
Remove libgomp deps
This commit is contained in:
parent
604131b31d
commit
3357f286ab
@ -11,23 +11,9 @@ use SPC\util\SPCTarget;
|
|||||||
#[CustomExt('imagick')]
|
#[CustomExt('imagick')]
|
||||||
class imagick extends Extension
|
class imagick extends Extension
|
||||||
{
|
{
|
||||||
public function patchBeforeMake(): bool
|
|
||||||
{
|
|
||||||
if (PHP_OS_FAMILY !== 'Linux') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (SPCTarget::isTarget(SPCTarget::GLIBC)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// imagick with calls omp_pause_all, which requires openmp, on non-musl we build imagick without openmp
|
|
||||||
$extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -lgomp');
|
|
||||||
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getUnixConfigureArg(bool $shared = false): string
|
public function getUnixConfigureArg(bool $shared = false): string
|
||||||
{
|
{
|
||||||
$disable_omp = SPCTarget::isTarget(SPCTarget::GLIBC) ? ' ac_cv_func_omp_pause_resource_all=no' : '';
|
$disable_omp = ' ac_cv_func_omp_pause_resource_all=no';
|
||||||
return '--with-imagick=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH . $disable_omp;
|
return '--with-imagick=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH . $disable_omp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -145,10 +145,6 @@ class SPCConfigUtil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// patch: imagick (imagemagick wrapper) for linux needs libgomp
|
|
||||||
if (in_array('imagemagick', $libraries) && !SPCTarget::isTarget(SPCTarget::GLIBC)) {
|
|
||||||
$short_name[] = '-lgomp';
|
|
||||||
}
|
|
||||||
return implode(' ', $short_name);
|
return implode(' ', $short_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user