From 3357f286ab0d20bafcaa6547d5b81ddaf843d520 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 28 Jun 2025 17:13:22 +0800 Subject: [PATCH] Remove libgomp deps --- src/SPC/builder/extension/imagick.php | 16 +--------------- src/SPC/util/SPCConfigUtil.php | 4 ---- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/SPC/builder/extension/imagick.php b/src/SPC/builder/extension/imagick.php index bcdbffab..8332f832 100644 --- a/src/SPC/builder/extension/imagick.php +++ b/src/SPC/builder/extension/imagick.php @@ -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; } diff --git a/src/SPC/util/SPCConfigUtil.php b/src/SPC/util/SPCConfigUtil.php index bf441efe..9335e88d 100644 --- a/src/SPC/util/SPCConfigUtil.php +++ b/src/SPC/util/SPCConfigUtil.php @@ -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); }