From c186038dcac42ce763f5b0111291c9cb0c3a8dba Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 10 May 2026 16:27:25 +0800 Subject: [PATCH] Use system cc instead --- src/Package/Target/php/unix.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Package/Target/php/unix.php b/src/Package/Target/php/unix.php index 641c12f6..2b832fe5 100644 --- a/src/Package/Target/php/unix.php +++ b/src/Package/Target/php/unix.php @@ -168,7 +168,7 @@ trait unix #[BeforeStage('php', [self::class, 'makeForUnix'], 'php')] #[PatchDescription('Patch Makefile to fix //lib path for Linux builds')] - #[PatchDescription('Patch BUILD_CC to disable auto-vectorization when zig-cc is used (prevents minilua segfault)')] + #[PatchDescription('Patch BUILD_CC to use system cc instead of zig-cc (prevents minilua crash)')] public function tryPatchMakefileUnix(TargetPackage $package, ToolchainInterface $toolchain): void { if (SystemTarget::getTargetOS() !== 'Linux') { @@ -178,10 +178,9 @@ trait unix // replace //lib with /lib in Makefile shell()->cd($package->getSourceDir())->exec('sed -i "s|//lib|/lib|g" Makefile'); - // try to fix minilua with zig-cc, disable vectorize for some edge cases if ($toolchain instanceof ZigToolchain) { $makefile = "{$package->getSourceDir()}/Makefile"; - FileSystem::replaceFileRegex($makefile, '/^(BUILD_CC\s*=\s*zig-cc)\s*$/m', '$1 -fno-vectorize -fno-slp-vectorize'); + FileSystem::replaceFileRegex($makefile, '/^BUILD_CC\s*=\s*zig-cc\s*$/m', 'BUILD_CC = cc'); } }