Merge pull request #782 from crazywhalecc/fix/aarch64-uv-pthread

fix uv missing pthread_atfork in aarch64 centos 7
This commit is contained in:
Marc
2025-06-20 17:22:52 +07:00
committed by GitHub
7 changed files with 44 additions and 28 deletions

View File

@@ -193,7 +193,7 @@ class Extension
* If you need to patch some code, overwrite this
* return true if you patched something, false if not
*/
public function patchBeforeSharedBuild(): bool
public function patchBeforeSharedPhpize(): bool
{
return false;
}
@@ -208,6 +208,16 @@ class Extension
return false;
}
/**
* Patch code before shared extension make
* If you need to patch some code, overwrite this
* return true if you patched something, false if not
*/
public function patchBeforeSharedMake(): bool
{
return false;
}
/**
* @return string
* returns a command line string with all required shared extensions to load
@@ -387,13 +397,17 @@ class Extension
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
];
if ($this->patchBeforeSharedPhpize()) {
logger()->info("Extension [{$this->getName()}] patched before shared phpize");
}
// prepare configure args
shell()->cd($this->source_dir)
->setEnv($env)
->exec(BUILD_BIN_PATH . '/phpize');
if ($this->patchBeforeSharedConfigure()) {
logger()->info('ext [ . ' . $this->getName() . '] patching before shared configure');
logger()->info("Extension [{$this->getName()}] patched before shared configure");
}
shell()->cd($this->source_dir)
@@ -411,6 +425,10 @@ class Extension
'$1 ' . $staticLibString
);
if ($this->patchBeforeSharedMake()) {
logger()->info("Extension [{$this->getName()}] patched before shared make");
}
shell()->cd($this->source_dir)
->setEnv($env)
->exec('make clean')