mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Remove aarch64 build fix for glibc 2.17 from patchBeforeBuild method in postgresql.php
This commit is contained in:
parent
0e80f29e61
commit
d6ec0b7809
@ -10,7 +10,6 @@ use StaticPHP\Attribute\Package\BuildFor;
|
|||||||
use StaticPHP\Attribute\Package\Library;
|
use StaticPHP\Attribute\Package\Library;
|
||||||
use StaticPHP\Attribute\Package\PatchBeforeBuild;
|
use StaticPHP\Attribute\Package\PatchBeforeBuild;
|
||||||
use StaticPHP\Attribute\PatchDescription;
|
use StaticPHP\Attribute\PatchDescription;
|
||||||
use StaticPHP\Exception\FileSystemException;
|
|
||||||
use StaticPHP\Package\LibraryPackage;
|
use StaticPHP\Package\LibraryPackage;
|
||||||
use StaticPHP\Package\PackageBuilder;
|
use StaticPHP\Package\PackageBuilder;
|
||||||
use StaticPHP\Package\PackageInstaller;
|
use StaticPHP\Package\PackageInstaller;
|
||||||
@ -38,20 +37,6 @@ class postgresql extends LibraryPackage
|
|||||||
#[PatchDescription('Various patches before building PostgreSQL')]
|
#[PatchDescription('Various patches before building PostgreSQL')]
|
||||||
public function patchBeforeBuild(): bool
|
public function patchBeforeBuild(): bool
|
||||||
{
|
{
|
||||||
// fix aarch64 build on glibc 2.17 (e.g. CentOS 7)
|
|
||||||
if (SystemTarget::getLibcVersion() === '2.17' && SystemTarget::getTargetArch() === 'aarch64') {
|
|
||||||
try {
|
|
||||||
FileSystem::replaceFileStr("{$this->getSourceDir()}/src/port/pg_popcount_aarch64.c", 'HWCAP_SVE', '0');
|
|
||||||
FileSystem::replaceFileStr(
|
|
||||||
"{$this->getSourceDir()}/src/port/pg_crc32c_armv8_choose.c",
|
|
||||||
'#if defined(__linux__) && !defined(__aarch64__) && !defined(HWCAP2_CRC32)',
|
|
||||||
'#if defined(__linux__) && !defined(HWCAP_CRC32)'
|
|
||||||
);
|
|
||||||
} catch (FileSystemException) {
|
|
||||||
// allow file not-existence to make it compatible with old and new version
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// skip the test on platforms where libpq infrastructure may be provided by statically-linked libraries
|
// skip the test on platforms where libpq infrastructure may be provided by statically-linked libraries
|
||||||
FileSystem::replaceFileStr("{$this->getSourceDir()}/src/interfaces/libpq/Makefile", 'invokes exit\'; exit 1;', 'invokes exit\';');
|
FileSystem::replaceFileStr("{$this->getSourceDir()}/src/interfaces/libpq/Makefile", 'invokes exit\'; exit 1;', 'invokes exit\';');
|
||||||
// disable shared libs build
|
// disable shared libs build
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user