Remove libgomp deps

This commit is contained in:
crazywhalecc 2025-06-28 17:13:22 +08:00
parent 604131b31d
commit 3357f286ab
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
2 changed files with 1 additions and 19 deletions

View File

@ -11,23 +11,9 @@ use SPC\util\SPCTarget;
#[CustomExt('imagick')]
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
{
$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;
}

View File

@ -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);
}