Skip to content

Commit e31e228

Browse files
committed
don't hardcode architecture
1 parent 47cbdf5 commit e31e228

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/SPC/toolchain/ToolchainManager.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ public static function afterInitToolchain(): void
5454
if (!getenv('SPC_TOOLCHAIN')) {
5555
throw new WrongUsageException('SPC_TOOLCHAIN was not properly set. Please contact the developers.');
5656
}
57-
if (SPCTarget::getLibc() === 'musl' && !SPCTarget::isStatic() && !file_exists('/lib/ld-musl-x86_64.so.1')) {
57+
$musl_wrapper_lib = sprintf('/lib/ld-musl-%s.so.1', php_uname('m'));
58+
if (SPCTarget::getLibc() === 'musl' && !SPCTarget::isStatic() && !file_exists($musl_wrapper_lib)) {
5859
throw new RuntimeException('You are linking against musl libc dynamically, but musl libc is not installed. Please install it with `sudo dnf install musl-libc` or `sudo apt install musl`');
5960
}
6061
if (SPCTarget::getLibc() === 'glibc' && SystemUtil::isMuslDist()) {

0 commit comments

Comments
 (0)