mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 18:05:36 +08:00
Compare commits
4 Commits
5b5861c366
...
970343b143
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
970343b143 | ||
|
|
e21bb528c0 | ||
|
|
0ed1bbc74a | ||
|
|
1272acd07e |
@@ -129,6 +129,15 @@ class SourcePatcher
|
||||
FileSystem::replaceFileRegex(SOURCE_PATH . '/php-src/configure', '/have_capstone="yes"/', 'have_capstone="no"');
|
||||
}
|
||||
|
||||
// PHP 8.2 and below: bcmath libbcmath uses K&R style C function
|
||||
if (is_unix() && $builder->getPHPVersionID() < 80300) {
|
||||
FileSystem::replaceFileStr(
|
||||
SOURCE_PATH . '/php-src/configure',
|
||||
"for ac_arg in '' -std=gnu23",
|
||||
"for ac_arg in '' -std=gnu17",
|
||||
);
|
||||
}
|
||||
|
||||
if (file_exists(SOURCE_PATH . '/php-src/configure.ac.bak')) {
|
||||
// restore configure.ac
|
||||
FileSystem::restoreBackupFile(SOURCE_PATH . '/php-src/configure.ac');
|
||||
|
||||
@@ -182,7 +182,7 @@ class UnixCMakeExecutor extends Executor
|
||||
$target_arch = arch2gnu(php_uname('m'));
|
||||
$cflags = getenv('SPC_DEFAULT_C_FLAGS');
|
||||
$cc = getenv('CC');
|
||||
$cxx = getenv('CCX');
|
||||
$cxx = getenv('CXX');
|
||||
$include = BUILD_INCLUDE_PATH;
|
||||
logger()->debug("making cmake tool chain file for {$os} {$target_arch} with CFLAGS='{$cflags}'");
|
||||
$root = BUILD_ROOT_PATH;
|
||||
|
||||
Reference in New Issue
Block a user