mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
yet another damn centos 7 patch
This commit is contained in:
parent
883cc4b6fd
commit
3a85d96fa4
@ -488,7 +488,7 @@ class Extension
|
|||||||
*
|
*
|
||||||
* @return array [staticLibString, sharedLibString]
|
* @return array [staticLibString, sharedLibString]
|
||||||
*/
|
*/
|
||||||
private function getStaticAndSharedLibs(): array
|
protected function getStaticAndSharedLibs(): array
|
||||||
{
|
{
|
||||||
$config = (new SPCConfigUtil($this->builder))->config([$this->getName()], with_dependencies: true);
|
$config = (new SPCConfigUtil($this->builder))->config([$this->getName()], with_dependencies: true);
|
||||||
$sharedLibString = '';
|
$sharedLibString = '';
|
||||||
|
|||||||
@ -5,7 +5,9 @@ declare(strict_types=1);
|
|||||||
namespace SPC\builder\extension;
|
namespace SPC\builder\extension;
|
||||||
|
|
||||||
use SPC\builder\Extension;
|
use SPC\builder\Extension;
|
||||||
|
use SPC\store\FileSystem;
|
||||||
use SPC\util\CustomExt;
|
use SPC\util\CustomExt;
|
||||||
|
use SPC\util\SPCConfigUtil;
|
||||||
|
|
||||||
#[CustomExt('imagick')]
|
#[CustomExt('imagick')]
|
||||||
class imagick extends Extension
|
class imagick extends Extension
|
||||||
@ -29,4 +31,15 @@ class imagick extends Extension
|
|||||||
$disable_omp = !(getenv('SPC_LIBC') === 'glibc' && str_contains(getenv('CC'), 'devtoolset-10')) ? '' : ' ac_cv_func_omp_pause_resource_all=no';
|
$disable_omp = !(getenv('SPC_LIBC') === 'glibc' && str_contains(getenv('CC'), 'devtoolset-10')) ? '' : ' 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
|
||||||
|
{
|
||||||
|
// on centos 7, it will use the symbol _ZTINSt6thread6_StateE, which is not defined in system libstdc++.so.6
|
||||||
|
[$static, $shared] = parent::getStaticAndSharedLibs();
|
||||||
|
if (getenv('SPC_LIBC') === 'glibc' && str_contains(getenv('CC'), 'devtoolset-10')) {
|
||||||
|
$static .= ' -lstdc++';
|
||||||
|
$shared = str_replace('-lstdc++', '', $shared);
|
||||||
|
}
|
||||||
|
return [$static, $shared];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user