mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
bring back static -lstdc++ for rhel 2.17
This commit is contained in:
parent
e34eb502db
commit
55fd7ba8e6
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||||||
namespace SPC\builder\extension;
|
namespace SPC\builder\extension;
|
||||||
|
|
||||||
use SPC\builder\Extension;
|
use SPC\builder\Extension;
|
||||||
|
use SPC\builder\linux\SystemUtil;
|
||||||
use SPC\util\CustomExt;
|
use SPC\util\CustomExt;
|
||||||
|
|
||||||
#[CustomExt('imagick')]
|
#[CustomExt('imagick')]
|
||||||
@ -15,4 +16,14 @@ class imagick extends Extension
|
|||||||
$disable_omp = ' 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getStaticAndSharedLibs(): array
|
||||||
|
{
|
||||||
|
[$static, $shared] = parent::getStaticAndSharedLibs();
|
||||||
|
if (SystemUtil::getLibcVersionIfExists('glibc') && SystemUtil::getLibcVersionIfExists('glibc') <= '2.17') {
|
||||||
|
$static .= ' -lstdc++';
|
||||||
|
$shared = str_replace('-lstdc++', '', $shared);
|
||||||
|
}
|
||||||
|
return [$static, $shared];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,7 +24,7 @@ $test_os = [
|
|||||||
// 'macos-13', // bin/spc for x86_64
|
// 'macos-13', // bin/spc for x86_64
|
||||||
// 'macos-14', // bin/spc for arm64
|
// 'macos-14', // bin/spc for arm64
|
||||||
'macos-15', // bin/spc for arm64
|
'macos-15', // bin/spc for arm64
|
||||||
'ubuntu-latest', // bin/spc-alpine-docker for x86_64
|
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
|
||||||
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
|
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
|
||||||
'ubuntu-24.04', // bin/spc for x86_64
|
'ubuntu-24.04', // bin/spc for x86_64
|
||||||
// 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
|
// 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user