mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-10 02:15:36 +08:00
patch things for zig compatibility
This commit is contained in:
@@ -387,8 +387,8 @@ class Extension
|
|||||||
|
|
||||||
// macOS ld64 doesn't understand these, while Linux and BSD do
|
// 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
|
// 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 ' : '';
|
$preStatic = PHP_OS_FAMILY !== 'Darwin' ? '-Wl,--start-group ' : '';
|
||||||
$postStatic = PHP_OS_FAMILY !== 'Darwin' ? ' -Wl,--end-group -Wl,-Bdynamic ' : ' ';
|
$postStatic = PHP_OS_FAMILY !== 'Darwin' ? ' -Wl,--end-group ' : ' ';
|
||||||
$env = [
|
$env = [
|
||||||
'CFLAGS' => $config['cflags'],
|
'CFLAGS' => $config['cflags'],
|
||||||
'CXXFLAGS' => $config['cflags'],
|
'CXXFLAGS' => $config['cflags'],
|
||||||
|
|||||||
@@ -26,8 +26,11 @@ trait ldap
|
|||||||
'--disable-slapd',
|
'--disable-slapd',
|
||||||
'--without-systemd',
|
'--without-systemd',
|
||||||
'--without-cyrus-sasl',
|
'--without-cyrus-sasl',
|
||||||
|
'--without-cyrus-sasl',
|
||||||
|
'ac_cv_func_pthread_kill_other_threads_np=no'
|
||||||
)
|
)
|
||||||
->appendEnv([
|
->appendEnv([
|
||||||
|
'CFLAGS' => '-Wno-date-time',
|
||||||
'LDFLAGS' => "-L{$this->getLibDir()}",
|
'LDFLAGS' => "-L{$this->getLibDir()}",
|
||||||
'CPPFLAGS' => "-I{$this->getIncludeDir()}",
|
'CPPFLAGS' => "-I{$this->getIncludeDir()}",
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ trait liblz4
|
|||||||
{
|
{
|
||||||
shell()->cd($this->source_dir)->initializeEnv($this)
|
shell()->cd($this->source_dir)->initializeEnv($this)
|
||||||
->exec("make PREFIX='' clean")
|
->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);
|
->exec("make install PREFIX='' DESTDIR=" . BUILD_ROOT_PATH);
|
||||||
|
|
||||||
$this->patchPkgconfPrefix(['liblz4.pc']);
|
$this->patchPkgconfPrefix(['liblz4.pc']);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ trait pkgconfig
|
|||||||
{
|
{
|
||||||
UnixAutoconfExecutor::create($this)
|
UnixAutoconfExecutor::create($this)
|
||||||
->appendEnv([
|
->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',
|
'LDFLAGS' => !($this instanceof LinuxLibraryBase) || getenv('SPC_LIBC') === 'glibc' ? '' : '--static',
|
||||||
])
|
])
|
||||||
->configure(
|
->configure(
|
||||||
|
|||||||
Reference in New Issue
Block a user