mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-22 00:05:37 +08:00
suboptimal solutions, but a bit closer to building
This commit is contained in:
@@ -71,7 +71,7 @@ CXX=${SPC_LINUX_DEFAULT_CXX}
|
|||||||
AR=${SPC_LINUX_DEFAULT_AR}
|
AR=${SPC_LINUX_DEFAULT_AR}
|
||||||
LD=${SPC_LINUX_DEFAULT_LD}
|
LD=${SPC_LINUX_DEFAULT_LD}
|
||||||
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
|
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
|
||||||
SPC_DEFAULT_C_FLAGS="-fPIC -Os"
|
SPC_DEFAULT_C_FLAGS="-fPIC -Os -Wno-error=date-time"
|
||||||
SPC_DEFAULT_CXX_FLAGS="-fPIC -Os"
|
SPC_DEFAULT_CXX_FLAGS="-fPIC -Os"
|
||||||
; extra libs for building php executable, used in `make` command for building php (this value may changed by extension build process, space separated)
|
; extra libs for building php executable, used in `make` command for building php (this value may changed by extension build process, space separated)
|
||||||
SPC_EXTRA_LIBS=
|
SPC_EXTRA_LIBS=
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class amqp extends Extension
|
|||||||
|
|
||||||
public function getUnixConfigureArg(bool $shared = false): string
|
public function getUnixConfigureArg(bool $shared = false): string
|
||||||
{
|
{
|
||||||
return '--with-amqp' . ($shared ? '=shared' : '') . ' --with-librabbitmq-dir=' . BUILD_ROOT_PATH;
|
return '--with-amqp' . ($sh<ared ? '=shared' : '') . ' --with-librabbitmq-dir=' . BUILD_ROOT_PATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getWindowsConfigureArg($shared = false): string
|
public function getWindowsConfigureArg($shared = false): string
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class imagick extends Extension
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// imagick with calls omp_pause_all, which requires openmp, on non-musl we build imagick without openmp
|
// 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');
|
$extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -lomp');
|
||||||
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
|
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ abstract class UnixBuilderBase extends BuilderBase
|
|||||||
'GOPATH' => PKG_ROOT_PATH . '/go',
|
'GOPATH' => PKG_ROOT_PATH . '/go',
|
||||||
'CGO_ENABLED' => '1',
|
'CGO_ENABLED' => '1',
|
||||||
'CGO_CFLAGS' => $config['cflags'],
|
'CGO_CFLAGS' => $config['cflags'],
|
||||||
'CGO_LDFLAGS' => "{$config['ldflags']} {$config['libs']} {$lrt}",
|
'CGO_LDFLAGS' => "{$config['ldflags']} {$config['libs']} {$lrt} -L/usr/lib64",
|
||||||
'XCADDY_GO_BUILD_FLAGS' => '-buildmode=pie ' .
|
'XCADDY_GO_BUILD_FLAGS' => '-buildmode=pie ' .
|
||||||
'-ldflags \"-linkmode=external ' . $extLdFlags . ' ' . $debugFlags .
|
'-ldflags \"-linkmode=external ' . $extLdFlags . ' ' . $debugFlags .
|
||||||
'-X \'github.com/caddyserver/caddy/v2.CustomVersion=FrankenPHP ' .
|
'-X \'github.com/caddyserver/caddy/v2.CustomVersion=FrankenPHP ' .
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace SPC\builder\unix\library;
|
|||||||
|
|
||||||
use SPC\exception\FileSystemException;
|
use SPC\exception\FileSystemException;
|
||||||
use SPC\exception\RuntimeException;
|
use SPC\exception\RuntimeException;
|
||||||
|
use SPC\store\FileSystem;
|
||||||
use SPC\util\executor\UnixAutoconfExecutor;
|
use SPC\util\executor\UnixAutoconfExecutor;
|
||||||
|
|
||||||
trait librdkafka
|
trait librdkafka
|
||||||
@@ -16,6 +17,7 @@ trait librdkafka
|
|||||||
*/
|
*/
|
||||||
protected function build(): void
|
protected function build(): void
|
||||||
{
|
{
|
||||||
|
FileSystem::replaceFileStr($this->source_dir . '/lds-gen.py', "funcs.append('rd_ut_coverage_check')", '');
|
||||||
UnixAutoconfExecutor::create($this)
|
UnixAutoconfExecutor::create($this)
|
||||||
->optionalLib(
|
->optionalLib(
|
||||||
'zstd',
|
'zstd',
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ class SPCConfigUtil
|
|||||||
}
|
}
|
||||||
// patch: imagick (imagemagick wrapper) for linux needs libgomp
|
// patch: imagick (imagemagick wrapper) for linux needs libgomp
|
||||||
if (in_array('imagemagick', $libraries) && PHP_OS_FAMILY === 'Linux' && !(getenv('SPC_LIBC') === 'glibc' && str_contains(getenv('CC'), 'devtoolset-10'))) {
|
if (in_array('imagemagick', $libraries) && PHP_OS_FAMILY === 'Linux' && !(getenv('SPC_LIBC') === 'glibc' && str_contains(getenv('CC'), 'devtoolset-10'))) {
|
||||||
$short_name[] = '-lgomp';
|
$short_name[] = '-lomp';
|
||||||
}
|
}
|
||||||
return implode(' ', $short_name);
|
return implode(' ', $short_name);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user