mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 09:25:35 +08:00
Remove SPC_NO_MUSL_PATH, remove --libc, use SPC_LIBC instead (#642)
* Remove SPC_NO_MUSL_PATH, remove --libc, use SPC_LIBC instead * Fix tests * Internally use GNU_ARCH for unified * Update EXTENSION_DIR comments for env.ini * Remove redundant -fPIC cflags in curl
This commit is contained in:
@@ -26,6 +26,9 @@ class LinuxMuslCheck
|
||||
if (SystemUtil::isMuslDist()) {
|
||||
return CheckResult::ok('musl-based distro, skipped');
|
||||
}
|
||||
if (getenv('SPC_LIBC') === 'glibc') {
|
||||
return CheckResult::ok('Building with glibc, 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')) {
|
||||
@@ -40,6 +43,10 @@ class LinuxMuslCheck
|
||||
if (SystemUtil::isMuslDist()) {
|
||||
return CheckResult::ok('musl-based distro, skipped');
|
||||
}
|
||||
if (getenv('SPC_LIBC') === 'glibc') {
|
||||
return CheckResult::ok('Building with glibc, skipped');
|
||||
}
|
||||
|
||||
$arch = arch2gnu(php_uname('m'));
|
||||
$cross_compile_lib = "/usr/local/musl/{$arch}-linux-musl/lib/libc.a";
|
||||
$cross_compile_gcc = "/usr/local/musl/bin/{$arch}-linux-musl-gcc";
|
||||
|
||||
@@ -40,7 +40,7 @@ class MacOSToolCheckList
|
||||
if (($path = $this->findCommand('brew')) === null) {
|
||||
return CheckResult::fail('Homebrew is not installed', 'brew');
|
||||
}
|
||||
if ($path !== '/opt/homebrew/bin/brew' && php_uname('m') === 'arm64') {
|
||||
if ($path !== '/opt/homebrew/bin/brew' && getenv('GNU_ARCH') === 'aarch64') {
|
||||
return CheckResult::fail('Current homebrew (/usr/local/bin/homebrew) is not installed for M1 Mac, please re-install homebrew in /opt/homebrew/ !');
|
||||
}
|
||||
return CheckResult::ok();
|
||||
|
||||
Reference in New Issue
Block a user