File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff 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 ' ,
Original file line number Diff line number Diff 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 " ;
You can’t perform that action at this time.
0 commit comments