mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-13 03:45:37 +08:00
fix test
This commit is contained in:
@@ -98,7 +98,7 @@ 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"
|
||||||
SPC_DEFAULT_CXX_FLAGS="-fPIC -Os"
|
SPC_DEFAULT_CXX_FLAGS="-fPIC -Os"
|
||||||
SPC_DEFAULT_LD_FLAGS="-Wl,--as-needed -Wl,--undefined-version"
|
SPC_DEFAULT_LD_FLAGS="-Wl,--as-needed"
|
||||||
; upx executable path
|
; upx executable path
|
||||||
UPX_EXEC=${PKG_ROOT_PATH}/bin/upx
|
UPX_EXEC=${PKG_ROOT_PATH}/bin/upx
|
||||||
; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches
|
; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ class LinuxBuilder extends UnixBuilderBase
|
|||||||
'CFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'),
|
'CFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'),
|
||||||
'CPPFLAGS' => '-I' . BUILD_INCLUDE_PATH, // . ' -Dsomethinghere', // . $musl_flag,
|
'CPPFLAGS' => '-I' . BUILD_INCLUDE_PATH, // . ' -Dsomethinghere', // . $musl_flag,
|
||||||
'LDFLAGS' => '-L' . BUILD_LIB_PATH,
|
'LDFLAGS' => '-L' . BUILD_LIB_PATH,
|
||||||
|
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
|
||||||
// 'LIBS' => SPCTarget::getRuntimeLibs(), // do not pass static libraries here yet, they may contain polyfills for libc functions!
|
// 'LIBS' => SPCTarget::getRuntimeLibs(), // do not pass static libraries here yet, they may contain polyfills for libc functions!
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ class ZigToolchain implements ToolchainInterface
|
|||||||
GlobalEnvManager::putenv("SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS={$extraCflags}");
|
GlobalEnvManager::putenv("SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS={$extraCflags}");
|
||||||
GlobalEnvManager::putenv('RANLIB=zig-ranlib');
|
GlobalEnvManager::putenv('RANLIB=zig-ranlib');
|
||||||
GlobalEnvManager::putenv('OBJCOPY=zig-objcopy');
|
GlobalEnvManager::putenv('OBJCOPY=zig-objcopy');
|
||||||
|
$defaultLdFlags = getenv('SPC_DEFAULT_LD_FLAGS') ?: '';
|
||||||
|
if (!str_contains($defaultLdFlags, '-Wl,--undefined-version') && !getenv('SPC_LINK_STATIC')) {
|
||||||
|
GlobalEnvManager::putenv("SPC_DEFAULT_LD_FLAGS={$defaultLdFlags} -Wl,--undefined-version");
|
||||||
|
}
|
||||||
$extra_libs = getenv('SPC_EXTRA_LIBS') ?: '';
|
$extra_libs = getenv('SPC_EXTRA_LIBS') ?: '';
|
||||||
if (!str_contains($extra_libs, '-lunwind')) {
|
if (!str_contains($extra_libs, '-lunwind')) {
|
||||||
// Add unwind library if not already present
|
// Add unwind library if not already present
|
||||||
|
|||||||
Reference in New Issue
Block a user