mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 21:34:53 +08:00
don't check for musl toolkit when running zig, add -static to ncurses
This commit is contained in:
parent
797aaf1ea8
commit
d2dea83c63
@ -14,6 +14,9 @@ trait ncurses
|
||||
$filelist = FileSystem::scanDirFiles(BUILD_BIN_PATH, relative: true);
|
||||
|
||||
UnixAutoconfExecutor::create($this)
|
||||
->appendEnv([
|
||||
'LDFLAGS' => getenv('SPC_LIBC') === 'musl' ? '-static' : ''
|
||||
])
|
||||
->configure(
|
||||
'--enable-overwrite',
|
||||
'--with-curses-h',
|
||||
@ -22,6 +25,7 @@ trait ncurses
|
||||
'--disable-widec',
|
||||
'--with-normal',
|
||||
'--with-ticlib',
|
||||
'--with-pthread',
|
||||
'--without-tests',
|
||||
'--without-dlsym',
|
||||
'--without-debug',
|
||||
|
||||
@ -29,6 +29,9 @@ class LinuxMuslCheck
|
||||
if (getenv('SPC_LIBC') === 'glibc') {
|
||||
return CheckResult::ok('Building with glibc, skipped');
|
||||
}
|
||||
if (str_contains(getenv('CC'), 'zig')) {
|
||||
return CheckResult::ok('Building with zig, skipped');
|
||||
}
|
||||
|
||||
$musl_wrapper_lib = sprintf('/lib/ld-musl-%s.so.1', php_uname('m'));
|
||||
if (file_exists($musl_wrapper_lib) && file_exists('/usr/local/musl/lib/libc.a')) {
|
||||
@ -46,6 +49,9 @@ class LinuxMuslCheck
|
||||
if (getenv('SPC_LIBC') === 'glibc') {
|
||||
return CheckResult::ok('Building with glibc, skipped');
|
||||
}
|
||||
if (str_contains(getenv('CC'), 'zig')) {
|
||||
return CheckResult::ok('Building with zig, skipped');
|
||||
}
|
||||
|
||||
$arch = arch2gnu(php_uname('m'));
|
||||
$cross_compile_lib = "/usr/local/musl/{$arch}-linux-musl/lib/libc.a";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user