Skip to content

Commit 9a98fd9

Browse files
committed
patch things for zig compatibility
1 parent 1a42963 commit 9a98fd9

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/SPC/builder/Extension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ public function buildUnixShared(): void
387387

388388
// macOS ld64 doesn't understand these, while Linux and BSD do
389389
// use them to make sure that all symbols are picked up, even if a library has already been visited before
390-
$preStatic = PHP_OS_FAMILY !== 'Darwin' ? '-Wl,-Bstatic -Wl,--start-group ' : '';
391-
$postStatic = PHP_OS_FAMILY !== 'Darwin' ? ' -Wl,--end-group -Wl,-Bdynamic ' : ' ';
390+
$preStatic = PHP_OS_FAMILY !== 'Darwin' ? '-Wl,--start-group ' : '';
391+
$postStatic = PHP_OS_FAMILY !== 'Darwin' ? ' -Wl,--end-group ' : ' ';
392392
$env = [
393393
'CFLAGS' => $config['cflags'],
394394
'CXXFLAGS' => $config['cflags'],

src/SPC/builder/unix/library/ldap.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ protected function build(): void
2626
'--disable-slapd',
2727
'--without-systemd',
2828
'--without-cyrus-sasl',
29+
'--without-cyrus-sasl',
30+
'ac_cv_func_pthread_kill_other_threads_np=no'
2931
)
3032
->appendEnv([
33+
'CFLAGS' => '-Wno-date-time',
3134
'LDFLAGS' => "-L{$this->getLibDir()}",
3235
'CPPFLAGS' => "-I{$this->getIncludeDir()}",
3336
])

src/SPC/builder/unix/library/liblz4.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ protected function build(): void
1919
{
2020
shell()->cd($this->source_dir)->initializeEnv($this)
2121
->exec("make PREFIX='' clean")
22-
->exec("make -j{$this->builder->concurrency} PREFIX=''")
22+
->exec("make lib -j{$this->builder->concurrency} PREFIX=''")
23+
->exec("sed -i 's/^\\$(MAKE) -C \\$(PRGDIR) \\$@/#\\$(MAKE) -C \\$(PRGDIR) \\$@/' Makefile")
2324
->exec("make install PREFIX='' DESTDIR=" . BUILD_ROOT_PATH);
2425

2526
$this->patchPkgconfPrefix(['liblz4.pc']);

src/SPC/builder/unix/library/pkgconfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ protected function build(): void
1313
{
1414
UnixAutoconfExecutor::create($this)
1515
->appendEnv([
16-
'CFLAGS' => PHP_OS_FAMILY !== 'Linux' ? '-Wimplicit-function-declaration -Wno-int-conversion' : '',
16+
'CFLAGS' => '-Wimplicit-function-declaration -Wno-int-conversion',
1717
'LDFLAGS' => !($this instanceof LinuxLibraryBase) || getenv('SPC_LIBC') === 'glibc' ? '' : '--static',
1818
])
1919
->configure(

0 commit comments

Comments
 (0)