mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 09:55:37 +08:00
don't check for musl toolkit when running zig, add -static to ncurses
This commit is contained in:
@@ -14,6 +14,9 @@ trait ncurses
|
|||||||
$filelist = FileSystem::scanDirFiles(BUILD_BIN_PATH, relative: true);
|
$filelist = FileSystem::scanDirFiles(BUILD_BIN_PATH, relative: true);
|
||||||
|
|
||||||
UnixAutoconfExecutor::create($this)
|
UnixAutoconfExecutor::create($this)
|
||||||
|
->appendEnv([
|
||||||
|
'LDFLAGS' => getenv('SPC_LIBC') === 'musl' ? '-static' : ''
|
||||||
|
])
|
||||||
->configure(
|
->configure(
|
||||||
'--enable-overwrite',
|
'--enable-overwrite',
|
||||||
'--with-curses-h',
|
'--with-curses-h',
|
||||||
@@ -22,6 +25,7 @@ trait ncurses
|
|||||||
'--disable-widec',
|
'--disable-widec',
|
||||||
'--with-normal',
|
'--with-normal',
|
||||||
'--with-ticlib',
|
'--with-ticlib',
|
||||||
|
'--with-pthread',
|
||||||
'--without-tests',
|
'--without-tests',
|
||||||
'--without-dlsym',
|
'--without-dlsym',
|
||||||
'--without-debug',
|
'--without-debug',
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ class LinuxMuslCheck
|
|||||||
if (getenv('SPC_LIBC') === 'glibc') {
|
if (getenv('SPC_LIBC') === 'glibc') {
|
||||||
return CheckResult::ok('Building with glibc, skipped');
|
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'));
|
$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')) {
|
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') {
|
if (getenv('SPC_LIBC') === 'glibc') {
|
||||||
return CheckResult::ok('Building with glibc, skipped');
|
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'));
|
$arch = arch2gnu(php_uname('m'));
|
||||||
$cross_compile_lib = "/usr/local/musl/{$arch}-linux-musl/lib/libc.a";
|
$cross_compile_lib = "/usr/local/musl/{$arch}-linux-musl/lib/libc.a";
|
||||||
|
|||||||
Reference in New Issue
Block a user