File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/SPC/builder/unix/library Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 7
7
use SPC \builder \linux \library \LinuxLibraryBase ;
8
8
use SPC \exception \BuildFailureException ;
9
9
use SPC \store \FileSystem ;
10
+ use SPC \util \SPCTarget ;
10
11
11
12
trait postgresql
12
13
{
14
+ public function patchBeforeBuild (): bool
15
+ {
16
+ if (SPCTarget::getLibcVersion () === '2.17 ' && GNU_ARCH === 'aarch64 ' ) {
17
+ FileSystem::replaceFileStr (
18
+ $ this ->source_dir . '/src/port/pg_crc32c_armv8_choose.c ' ,
19
+ '#if defined(__linux__) && !defined(__aarch64__) && !defined(HWCAP2_CRC32) ' ,
20
+ '#if defined(__linux__) && !defined(HWCAP_CRC32) ' ,
21
+ );
22
+ return true ;
23
+ }
24
+ return false ;
25
+ }
26
+
13
27
protected function build (): void
14
28
{
15
29
$ builddir = BUILD_ROOT_PATH ;
@@ -55,7 +69,7 @@ protected function build(): void
55
69
if ($ this ->builder ->getLib ('icu ' )) {
56
70
$ libcpp = $ this instanceof LinuxLibraryBase ? ' -lstdc++ ' : ' -lc++ ' ;
57
71
}
58
- $ envs .= " LIBS= \"{$ libs } { $ libs }{ $ libcpp }\" " ; // macOS doesn't understand how to link properly
72
+ $ envs .= " LIBS= \"{$ libs }{ $ libcpp }\" " ;
59
73
}
60
74
if ($ error_exec_cnt > 0 ) {
61
75
throw new BuildFailureException ('Failed to get pkg-config information! ' );
You can’t perform that action at this time.
0 commit comments