fix unixodbc with lto?

This commit is contained in:
henderkes
2026-05-05 14:31:37 +07:00
parent cec488f10c
commit 956e8d0b14

View File

@@ -21,7 +21,7 @@ trait unixodbc
'Linux' => '/etc', 'Linux' => '/etc',
default => throw new WrongUsageException('Unsupported OS: ' . PHP_OS_FAMILY), default => throw new WrongUsageException('Unsupported OS: ' . PHP_OS_FAMILY),
}; };
UnixAutoconfExecutor::create($this) $make = UnixAutoconfExecutor::create($this)
->configure( ->configure(
'--disable-debug', '--disable-debug',
'--disable-dependency-tracking', '--disable-dependency-tracking',
@@ -29,8 +29,15 @@ trait unixodbc
'--with-included-ltdl', '--with-included-ltdl',
"--sysconfdir={$sysconf_selector}", "--sysconfdir={$sysconf_selector}",
'--enable-gui=no', '--enable-gui=no',
) );
->make();
FileSystem::replaceFileRegex(
"{$this->source_dir}/Makefile",
'/^(SUBDIRS\s*=\s*[^\n]*)\bexe\b\s*/m',
'$1'
);
$make->make();
$pkgConfigs = ['odbc.pc', 'odbccr.pc', 'odbcinst.pc']; $pkgConfigs = ['odbc.pc', 'odbccr.pc', 'odbcinst.pc'];
$this->patchPkgconfPrefix($pkgConfigs); $this->patchPkgconfPrefix($pkgConfigs);
foreach ($pkgConfigs as $file) { foreach ($pkgConfigs as $file) {