mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-05 07:45:39 +08:00
ensure liburing is only pulled in by suggested libs when glibc >= 2.30 (or musl)
This commit is contained in:
@@ -69,8 +69,10 @@ class swoole extends Extension
|
||||
$arg .= $this->builder->getExt('swoole-hook-mysql') ? ' --enable-mysqlnd' : ' --disable-mysqlnd';
|
||||
$arg .= $this->builder->getExt('swoole-hook-sqlite') ? ' --enable-swoole-sqlite' : ' --disable-swoole-sqlite';
|
||||
|
||||
$config = (new SPCConfigUtil($this->builder, ['libs_only_deps' => true]))->config([], ['unixodbc']);
|
||||
$arg .= $this->builder->getExt('swoole-hook-odbc') ? ' --with-swoole-odbc=unixODBC,' . BUILD_ROOT_PATH . ' SWOOLE_ODBC_LIBS="' . $config['libs'] . '"' : '';
|
||||
if ($this->builder->getExt('swoole-hook-odbc')) {
|
||||
$config = (new SPCConfigUtil($this->builder, ['libs_only_deps' => true]))->config([], ['unixodbc']);
|
||||
$arg .= ' --with-swoole-odbc=unixODBC,' . BUILD_ROOT_PATH . ' SWOOLE_ODBC_LIBS="' . $config['libs'] . '"';
|
||||
}
|
||||
return $arg;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\linux\library;
|
||||
|
||||
use SPC\exception\WrongUsageException;
|
||||
use SPC\util\executor\UnixAutoconfExecutor;
|
||||
use SPC\util\SPCTarget;
|
||||
|
||||
class liburing extends LinuxLibraryBase
|
||||
{
|
||||
@@ -12,8 +14,14 @@ class liburing extends LinuxLibraryBase
|
||||
|
||||
protected function build(): void
|
||||
{
|
||||
// Build liburing with static linking via autoconf
|
||||
if (SPCTarget::getLibc() === 'glibc' && SPCTarget::getLibcVersion() < 2.30) {
|
||||
throw new WrongUsageException('liburing requires glibc >= 2.30');
|
||||
}
|
||||
|
||||
UnixAutoconfExecutor::create($this)
|
||||
->appendEnv([
|
||||
'CFLAGS' => '-D_GNU_SOURCE'
|
||||
])
|
||||
->removeConfigureArgs(
|
||||
'--disable-shared',
|
||||
'--enable-static',
|
||||
|
||||
Reference in New Issue
Block a user