Skip to content

Commit c5316f9

Browse files
committed
-v3 doesn't have avx512 yet
1 parent 2d1a61d commit c5316f9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/SPC/builder/Extension.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,6 @@ public function buildUnixShared(): void
430430
}
431431

432432
$has_avx512 = str_contains($this->builder->arch_c_flags ?? '', '-mavx512') ||
433-
str_contains($this->builder->arch_c_flags ?? '', '-march=x86-64-v3') ||
434433
str_contains($this->arch_c_flags ?? '', '-march=x86-64-v4') ||
435434
ToolchainManager::getToolchainClass() !== ZigToolchain::class;
436435

@@ -440,7 +439,7 @@ public function buildUnixShared(): void
440439
->exec(
441440
'./configure ' . $this->getUnixConfigureArg(true) .
442441
' --with-php-config=' . BUILD_BIN_PATH . '/php-config ' .
443-
'--enable-shared --disable-static' . (!$has_avx512 ? ' php_cv_have_avx512=no ' : '')
442+
'--enable-shared --disable-static' . (!$has_avx512 ? ' php_cv_have_avx512=no php_cv_have_avx512vbmi=no' : '')
444443
);
445444

446445
if ($this->patchBeforeSharedMake()) {

src/SPC/builder/linux/LinuxBuilder.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ public function buildPHP(int $build_target = BUILD_TARGET_NONE): void
106106
}
107107

108108
$has_avx512 = str_contains($this->arch_c_flags, '-mavx512') ||
109-
str_contains($this->arch_c_flags, '-march=x86-64-v3') ||
110109
str_contains($this->arch_c_flags, '-march=x86-64-v4') ||
111110
ToolchainManager::getToolchainClass() !== ZigToolchain::class;
112111

@@ -123,7 +122,7 @@ public function buildPHP(int $build_target = BUILD_TARGET_NONE): void
123122
$json_74 .
124123
$zts .
125124
$maxExecutionTimers .
126-
(!$has_avx512 ? 'php_cv_have_avx512=no ' : '') .
125+
(!$has_avx512 ? 'php_cv_have_avx512=no php_cv_have_avx512vbmi ' : '') .
127126
$this->makeStaticExtensionArgs() . ' '
128127
));
129128

0 commit comments

Comments
 (0)