Skip to content

Commit e6cf05d

Browse files
committed
Test
1 parent c3e9a28 commit e6cf05d

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

src/SPC/builder/linux/LinuxBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ public function buildPHP(int $build_target = BUILD_TARGET_NONE): void
9797
$enableFrankenphp = ($build_target & BUILD_TARGET_FRANKENPHP) === BUILD_TARGET_FRANKENPHP;
9898

9999
// prepare build php envs
100-
$musl_flag = SPCTarget::getLibc() === 'musl' ? ' -D__MUSL__' : ' -U__MUSL__';
100+
// $musl_flag = SPCTarget::getLibc() === 'musl' ? ' -D__MUSL__' : ' -U__MUSL__';
101101
$php_configure_env = SystemUtil::makeEnvVarString([
102102
'CFLAGS' => getenv('SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS'),
103-
'CPPFLAGS' => '-I' . BUILD_INCLUDE_PATH . $musl_flag,
103+
'CPPFLAGS' => '-I' . BUILD_INCLUDE_PATH, // . $musl_flag,
104104
'LDFLAGS' => '-L' . BUILD_LIB_PATH,
105105
// 'LIBS' => SPCTarget::getRuntimeLibs(), // do not pass static libraries here yet, they may contain polyfills for libc functions!
106106
]);
@@ -359,7 +359,7 @@ private function getMakeExtraVars(): array
359359
$static = SPCTarget::isStatic() ? '-all-static' : '';
360360
$lib = BUILD_LIB_PATH;
361361
return [
362-
'CPPFLAGS' => SPCTarget::getLibc() === 'musl' ? '-D__MUSL__' : '-U__MUSL__',
362+
// 'CPPFLAGS' => SPCTarget::getLibc() === 'musl' ? '-D__MUSL__' : '-U__MUSL__',
363363
'EXTRA_CFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'),
364364
'EXTRA_LIBS' => $config['libs'],
365365
'EXTRA_LDFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS'),

src/SPC/store/SourcePatcher.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ public static function patchBeforeBuildconf(BuilderBase $builder): void
8686
);
8787
}
8888

89+
// patch configure.ac
90+
FileSystem::replaceFileStr(
91+
SOURCE_PATH . '/php-src/configure.ac',
92+
'if command -v ldd >/dev/null && ldd --version 2>&1 | grep ^musl >/dev/null 2>&1',
93+
'if [ "$SPC_LIBC" = "musl" ];'
94+
);
95+
if (getenv('SPC_LIBC') === false && ($libc = SPCTarget::getLibc()) !== null) {
96+
putenv("SPC_LIBC={$libc}");
97+
}
98+
8999
// patch php-src/build/php.m4 PKG_CHECK_MODULES -> PKG_CHECK_MODULES_STATIC
90100
FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/build/php.m4', 'PKG_CHECK_MODULES(', 'PKG_CHECK_MODULES_STATIC(');
91101

src/globals/test-extensions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// '8.3',
1919
'8.4',
2020
// '8.5',
21-
// 'git',
21+
'git',
2222
];
2323

2424
// test os (macos-13, macos-14, macos-15, ubuntu-latest, windows-latest are available)
@@ -28,7 +28,7 @@
2828
// 'macos-15', // bin/spc for arm64
2929
'ubuntu-latest', // bin/spc-alpine-docker for x86_64
3030
// 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
31-
// 'ubuntu-24.04', // bin/spc for x86_64
31+
'ubuntu-24.04', // bin/spc for x86_64
3232
'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
3333
'ubuntu-24.04-arm', // bin/spc for arm64
3434
// 'windows-latest', // .\bin\spc.ps1

0 commit comments

Comments
 (0)