Skip to content

Commit d2dea83

Browse files
committed
don't check for musl toolkit when running zig, add -static to ncurses
1 parent 797aaf1 commit d2dea83

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/SPC/builder/unix/library/ncurses.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ protected function build(): void
1414
$filelist = FileSystem::scanDirFiles(BUILD_BIN_PATH, relative: true);
1515

1616
UnixAutoconfExecutor::create($this)
17+
->appendEnv([
18+
'LDFLAGS' => getenv('SPC_LIBC') === 'musl' ? '-static' : ''
19+
])
1720
->configure(
1821
'--enable-overwrite',
1922
'--with-curses-h',
@@ -22,6 +25,7 @@ protected function build(): void
2225
'--disable-widec',
2326
'--with-normal',
2427
'--with-ticlib',
28+
'--with-pthread',
2529
'--without-tests',
2630
'--without-dlsym',
2731
'--without-debug',

src/SPC/doctor/item/LinuxMuslCheck.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public function checkMusl(): CheckResult
2929
if (getenv('SPC_LIBC') === 'glibc') {
3030
return CheckResult::ok('Building with glibc, skipped');
3131
}
32+
if (str_contains(getenv('CC'), 'zig')) {
33+
return CheckResult::ok('Building with zig, skipped');
34+
}
3235

3336
$musl_wrapper_lib = sprintf('/lib/ld-musl-%s.so.1', php_uname('m'));
3437
if (file_exists($musl_wrapper_lib) && file_exists('/usr/local/musl/lib/libc.a')) {
@@ -46,6 +49,9 @@ public function checkMuslCrossMake(): CheckResult
4649
if (getenv('SPC_LIBC') === 'glibc') {
4750
return CheckResult::ok('Building with glibc, skipped');
4851
}
52+
if (str_contains(getenv('CC'), 'zig')) {
53+
return CheckResult::ok('Building with zig, skipped');
54+
}
4955

5056
$arch = arch2gnu(php_uname('m'));
5157
$cross_compile_lib = "/usr/local/musl/{$arch}-linux-musl/lib/libc.a";

0 commit comments

Comments
 (0)