mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
patch things for zig compatibility
This commit is contained in:
parent
1a4296386a
commit
9a98fd9cff
@ -387,8 +387,8 @@ class Extension
|
||||
|
||||
// macOS ld64 doesn't understand these, while Linux and BSD do
|
||||
// use them to make sure that all symbols are picked up, even if a library has already been visited before
|
||||
$preStatic = PHP_OS_FAMILY !== 'Darwin' ? '-Wl,-Bstatic -Wl,--start-group ' : '';
|
||||
$postStatic = PHP_OS_FAMILY !== 'Darwin' ? ' -Wl,--end-group -Wl,-Bdynamic ' : ' ';
|
||||
$preStatic = PHP_OS_FAMILY !== 'Darwin' ? '-Wl,--start-group ' : '';
|
||||
$postStatic = PHP_OS_FAMILY !== 'Darwin' ? ' -Wl,--end-group ' : ' ';
|
||||
$env = [
|
||||
'CFLAGS' => $config['cflags'],
|
||||
'CXXFLAGS' => $config['cflags'],
|
||||
|
||||
@ -26,8 +26,11 @@ trait ldap
|
||||
'--disable-slapd',
|
||||
'--without-systemd',
|
||||
'--without-cyrus-sasl',
|
||||
'--without-cyrus-sasl',
|
||||
'ac_cv_func_pthread_kill_other_threads_np=no'
|
||||
)
|
||||
->appendEnv([
|
||||
'CFLAGS' => '-Wno-date-time',
|
||||
'LDFLAGS' => "-L{$this->getLibDir()}",
|
||||
'CPPFLAGS' => "-I{$this->getIncludeDir()}",
|
||||
])
|
||||
|
||||
@ -19,7 +19,8 @@ trait liblz4
|
||||
{
|
||||
shell()->cd($this->source_dir)->initializeEnv($this)
|
||||
->exec("make PREFIX='' clean")
|
||||
->exec("make -j{$this->builder->concurrency} PREFIX=''")
|
||||
->exec("make lib -j{$this->builder->concurrency} PREFIX=''")
|
||||
->exec("sed -i 's/^\\$(MAKE) -C \\$(PRGDIR) \\$@/#\\$(MAKE) -C \\$(PRGDIR) \\$@/' Makefile")
|
||||
->exec("make install PREFIX='' DESTDIR=" . BUILD_ROOT_PATH);
|
||||
|
||||
$this->patchPkgconfPrefix(['liblz4.pc']);
|
||||
|
||||
@ -13,7 +13,7 @@ trait pkgconfig
|
||||
{
|
||||
UnixAutoconfExecutor::create($this)
|
||||
->appendEnv([
|
||||
'CFLAGS' => PHP_OS_FAMILY !== 'Linux' ? '-Wimplicit-function-declaration -Wno-int-conversion' : '',
|
||||
'CFLAGS' => '-Wimplicit-function-declaration -Wno-int-conversion',
|
||||
'LDFLAGS' => !($this instanceof LinuxLibraryBase) || getenv('SPC_LIBC') === 'glibc' ? '' : '--static',
|
||||
])
|
||||
->configure(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user