Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/SPC/store/SourcePatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ public static function patchBeforeConfigure(BuilderBase $builder): void
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",
);
Comment thread
henderkes marked this conversation as resolved.
}

if (file_exists(SOURCE_PATH . '/php-src/configure.ac.bak')) {
// restore configure.ac
FileSystem::restoreBackupFile(SOURCE_PATH . '/php-src/configure.ac');
Expand Down
2 changes: 1 addition & 1 deletion src/SPC/util/executor/UnixCMakeExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private function makeCmakeToolchainFile(): string
$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;
Expand Down
Loading