Revert for test

This commit is contained in:
crazywhalecc
2025-03-29 18:56:38 +08:00
parent ddff725222
commit 944d7acf65
2 changed files with 2 additions and 14 deletions

View File

@@ -21,13 +21,7 @@ class imagick extends Extension
$extra_libs = trim($extra_libs . ' -lgomp'); $extra_libs = trim($extra_libs . ' -lgomp');
} }
if (getenv('SPC_LIBC') === 'glibc') { if (getenv('SPC_LIBC') === 'glibc') {
$ld = f_exec('/usr/bin/gcc --print-file-name=libgomp.a', $output, $result_code); $extra_libs = trim($extra_libs . ' -l:libgomp.a');
if ($result_code !== 0) {
logger()->error('Cannot find libgomp.a, please install libgomp-dev');
$extra_libs = trim($extra_libs . ' -l:libgomp.a');
} else {
$extra_libs = trim($extra_libs . ' ' . $ld);
}
} }
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs); f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
return true; return true;

View File

@@ -93,13 +93,7 @@ class SPCConfigUtil
// patch: imagick (imagemagick wrapper) for linux needs -lgomp // patch: imagick (imagemagick wrapper) for linux needs -lgomp
if (in_array('imagemagick', $libraries) && PHP_OS_FAMILY === 'Linux') { if (in_array('imagemagick', $libraries) && PHP_OS_FAMILY === 'Linux') {
if (getenv('SPC_LIBC') === 'glibc') { if (getenv('SPC_LIBC') === 'glibc') {
$ld = f_exec('/usr/bin/gcc --print-file-name=libgomp.a', $output, $result_code); $short_name[] = '-l:libgomp.a -l:libgomp_nonshared.a';
if ($result_code !== 0) {
// logger()->error('Cannot find libgomp.a, please install libgomp-dev');
$short_name[] = '-l:libgomp.a';
} else {
$short_name[] = $ld;
}
} else { } else {
$short_name[] = '-lgomp'; $short_name[] = '-lgomp';
} }